home *** CD-ROM | disk | FTP | other *** search
/ Chip 1996 November / Chip 11-96.iso / workshop / howto / scsi < prev    next >
Text File  |  1996-09-04  |  139KB  |  3,733 lines

  1. Archive-name: linux/howto/scsi
  2. Last-modified: 2 July 1996
  3. Version: 2.29
  4.  
  5. Copyright 1994, 1995, 1996, Drew Eckhardt
  6.  
  7.     This documentation is free documentation; you can redistribute it and/or 
  8.     modify it under the terms of the GNU General Public License as published by
  9.     the Free Software Foundation; either version 2 of the License, or
  10.     (at your option) any later version.
  11.  
  12.     This documentation is distributed in the hope that it will be useful,
  13.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.     GNU General Public License for more details.
  16.  
  17.     You should have received a copy of the GNU General Public License
  18.     along with this documentation; if not, write to the Free Software
  19.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21. That said, I'd appreciate it if people would ask me <drew@PoohSticks.ORG>
  22. if there's a newer version available before they publish it.  When people
  23. publish outdated versions, I get questions from users that are answered 
  24. in newer versions, and it reflects poorly on the publisher.  I'd also prefer 
  25. that all references to free distribution sites, and possibly competing
  26. distributions/products be left intact.  
  27.  
  28. IMPORTANT :
  29.  
  30. BUG REPORTS OR OTHER REQUESTS FOR HELP WHICH FAIL TO FOLLOW THE PROCEDURES 
  31. OUTLINED IN SECTION 2 WILL BE IGNORED.  
  32.  
  33. This HOWTO covers the Linux SCSI subsystem, as implemented in Linux
  34. kernel revision 1.2.10 and newer alpha code.  Earlier revisions of the 
  35. SCSI code are _unsupported_, and may differ significantly in terms of the 
  36. drivers implemented, performance, and options available.
  37.  
  38. For additional information, you may wish to join the linux-scsi mailing list
  39. by mailing majordomo@vger.rutgers.edu with the line 
  40.  
  41.     subscribe linux-scsi
  42.  
  43. in the text.  You can unsubscribe by sending mail to the same address and 
  44. including
  45.     
  46.     unsubscribe linux-scsi 
  47.  
  48. in the text.
  49.  
  50. Once you're subscribed, you can send mail to the list at 
  51.  
  52.     linux-scsi@vger.rutgers.edu
  53.  
  54. I'm aware that this document isn't the most user-friendly, 
  55. and that there may be inaccuracies and oversights.  If 
  56. you have constructive comments on how to rectify the situation
  57. you're free to mail me about it.
  58.  
  59. Table of contents 
  60. Section 1             Common Problems 
  61.     Section 1.1            General Flakiness
  62.     Section 1.2         The kernel command line
  63.     Section 1.3           A SCSI device shows up at all possible IDs 
  64.     Section 1.4         A SCSI device shows up at all possible LUNs
  65.     Section 1.5            You get sense errors when you know the 
  66.                     devices are error free
  67.     Section 1.6            A kernel configured with networking does 
  68.                     not work.
  69.     Section 1.7              Device detected, but unable to access.
  70.     Section 1.8            Sometimes the scsi subsystem locks up 
  71.                     completely.
  72.     Section 1.9         Configuring and building the kernel
  73.     Section 1.10        LUNS other than 0 don't work
  74.     
  75. Section 2            Reporting Bugs
  76.     Section 2.1            Capturing messages 
  77.     Section 2.2            Locating the source of a panic()
  78.  
  79. Section 3            Modules
  80.     Section 3.1            General information.
  81.     Section 3.2            Status of modules under 1.2 kernels.
  82.     Section 3.3            Status of modules under 1.3 kernels.
  83.  
  84. Section 4            Hosts
  85.     Section 4.1            Supported and Unsupported Hardware
  86.     Section 4.1.1        Multiple host adapters
  87.     Section 4.2            Common Problems
  88.     Section 4.3            Adaptec 152x, 151x, 1505, 282x, 
  89.                     Sound Blaster 16 SCSI,
  90.                     SCSI Pro, Gigabyte, and other AIC 
  91.                     6260/6360 based products (Standard)
  92.     Section 4.4            Adaptec 154x, Adaptec 1640, AMI FastDisk VLB,
  93.                     (DTC 329x may also work), (Standard)  
  94.     Section 4.5            Adaptec 174x (Standard)
  95.     Section 4.6            Adaptec 274x, 284x (Standard), 294x (ALPHA)
  96.     Section 4.7            Allways IN2000 (ALPHA)
  97.     Section 4.8            BusLogic MultiMaster Host Adapters
  98.     Section 4.9            BusLogic FlashPoint Host Adapters
  99.     Section 4.10        EATA-DMA: DPT SmartCache, SmartCache Plus,
  100.                     SmartCache III, SmartCache IV and 
  101.                     SmartRAID families (Standard)
  102.     Section 4.11        EATA-PIO: DPT PM2001 and PM2012A
  103.     Section 4.12        Future Domain 16x0 with TMC-1800, TMC-18C30,
  104.                     TMC-18C50, or TMC-36C70 chip (Standard)
  105.     Section 4.13        Generic NCR5380 / T130B (Standard)
  106.     Section 4.14        NCR53c8xx rel5 (Standard), rel10+ (ALPHA)
  107.     Section 4.15        Seagate ST0x/Future Domain TMC-8xx/TMC-9xx 
  108.                     (Standard)
  109.     Section 4.16         PAS16 (Standard)
  110.     Section 4.17        Trantor T128/T128F/T228 (Standard)
  111.     Section 4.18        Ultrastor 14f, 24f,  34f (Standard)
  112.     Section 4.19        Western Digital 7000 (Standard)
  113.     Section 4.20        AM53/79C974 (ALPHA)
  114.     Section 4.21        qlogic (STANDARD)
  115.  
  116. Section 5            Disks
  117.     Section 5.1         Supported and Unsupported Hardware 
  118.     Section 5.2         Common Problems 
  119.     Section 5.3            Device Files
  120.     Section 5.4            Partitioning 
  121.     Section 5.5            Disk Geometry
  122.  
  123. Section 6             CD ROMs
  124.     Section 6.1            Supported and Unsupported Hardware 
  125.     Section 6.2            Common Problems
  126.     Section 6.3            Device Files 
  127.  
  128. Section 7            Tapes
  129.     Section 7.1            Supported and Unsupported Hardware 
  130.     Section 7.2            Common Problems
  131.     Section 7.3            Device Files 
  132.  
  133. Section 8            Generic 
  134.     Section 8.1            Supported and Unsupported Hardware 
  135.     Section 8.2            Common Problems
  136.     Section 8.3            Device Files 
  137.  
  138. Section 9            Buyers' Guide
  139.     Section 9.1         Transfer types
  140.     Section 9.2         Scatter/gather
  141.     Section 9.3         Mailbox vs. non-mailbox
  142.     Section 9.4            Bus types
  143.     Section 9.5            Multiple devices
  144.     Section 9.6            SCSI-I, SCSI-II, FAST and WIDE options, etc.
  145.     Section 9.7            Driver feature comparison
  146.     Section 9.8              Board comparison 
  147.     Section 9.9            Summary
  148.     
  149. Section 10
  150.     Section 10.1        Assignment of minor numbers.
  151.  
  152. Section 1 : Common Problems 
  153.  
  154. This section lists some of the common problems that people
  155. have.  If there is not anything here that answers your questions, you
  156. should also consult the sections for your host adapter and the devices
  157. in that are giving you problems.
  158.  
  159. Section 1.1 : General Flakiness
  160.     If you experience random errors, the most likely causes are
  161.     cabling and termination problems.
  162.  
  163.     Some products, such as those built arround the newer NCR
  164.     chips, feature digital filtering and active signal negation,
  165.     and aren't very sensitive to cabling problems.
  166.  
  167.     Others, such as the Adaptec 154xC, 154xCF, and 274x, are _extremely_
  168.     sensitive and may fail with cables that work with other systems.
  169.  
  170.     I reiterate : some host adapters are _extremely_ sensitive to 
  171.     cabling and termination problems and therefore, cabling and
  172.     termination should be the first things checked when there are
  173.     problems.
  174.  
  175.     To minimize your problems, you should use cables which
  176.  
  177.         1.  Claim SCSI-II compliance
  178.     2.  Have a characteristic impedance of 132 ohms
  179.     3.  All come from the same source to avoid impedance mismatches
  180.     4.  Come from a reputable vendor such as Amphenol
  181.  
  182.     Termination power should be provided by _all_ devices on 
  183.     the SCSI bus, through a diode to prevent current backflow,
  184.     so that sufficient power is available at the ends of the cable 
  185.     where it is needed.  To prevent damage if the bus is shorted,
  186.     TERMPWR should be driven through a fuse or other current
  187.     limiting device.
  188.  
  189.     If multiple devices, external cables, or FAST SCSI 2 are used, 
  190.     active or forced perfect termination should be used on both ends 
  191.     of the SCSI bus.
  192.  
  193.     See the Comp.Periphs.Scsi FAQ (available on tsx-11 in 
  194.     pub/linux/ALPHA/scsi) for more information about active
  195.     termination.
  196.  
  197. Section 1.2 : The kernel command line
  198.  
  199.     Other parts of the documentation refer to a "kernel command line".  
  200.  
  201.     The kernel command line is a set of options you may specify 
  202.     from either the LILO : prompt after an immage name, or in the 
  203.     append field in your LILO configuration file (LILO .14 
  204.     and newer use /etc/lilo.conf, older versions use /etc/lilo/config).
  205.  
  206.     Boot your system with LILO, and hit one of the alt, control, or 
  207.     shift keys when it first comes up to get a prompt.  LILO 
  208.     should respond with 
  209.  
  210.         :
  211.  
  212.     At this prompt, you can select a kernel image to boot, or list
  213.     them with ?.  Ie
  214.  
  215.         :?
  216.  
  217.         ramdisk floppy harddisk
  218.  
  219.     To boot that kernel with the command line options you have 
  220.     selected, simply enter the name followed by a white space delimited
  221.     list of options, terminating with a return.  
  222.  
  223.     Options take the form of 
  224.  
  225.         variable=valuelist
  226.  
  227.     Where valuelist may be a single value or comma delimited list
  228.     of values with no whitespace.  With the exception of root device,
  229.     individual values are numbers, and may be specified in either 
  230.     decimal or hexadecimal.
  231.  
  232.     Ie, to boot linux with an Adaptec 1520 clone not recognized 
  233.     at bootup, you might type 
  234.  
  235.         :floppy aha152x=0x340,11,7,1
  236.  
  237.     If you don't care to type all of this at boot time, it is also
  238.     possible to use the LILO configuration file "append" option 
  239.     with LILO .13 and newer.
  240.  
  241.     Ie, 
  242.         append="aha152x=0x340,11,7,1"
  243.  
  244.  
  245. Section 1.3 :  A SCSI device shows up at all possible IDs 
  246.  
  247.     If this is the case, you have strapped the device at the same 
  248.     address as the controller (typically 7, although some boards
  249.     use other addresses, with 6 being used by some Future Domain 
  250.         boards).
  251.  
  252.     Please change the jumper settings.
  253.  
  254. Section 1.4 :  A SCSI device shows up at all possible LUNs
  255.  
  256.     The device has buggy firmware.  
  257.  
  258.     As an interim sollution, you should try using the kernel 
  259.     command line option
  260.  
  261.         max_scsi_luns=1
  262.  
  263.     If that works, there is a list of buggy devices
  264.     in the kernel sources in drivers/scsi/scsi.c in the variable
  265.     blacklist.  Add your device to this list and mail the patch
  266.     to Linus Torvalds <Linus.Torvalds@cs.Helsinki.FI>.
  267.  
  268. Section 1.5 :  You get sense errors when you know the devices are error free
  269.  
  270.     Sometimes this is caused by bad cables or impropper termination.
  271.  
  272.     See Section 1.1 : General Flakiness
  273.  
  274. Section 1.6 :  A kernel configured with networking does not work.
  275.  
  276.     The auto-probe routines for many of the network drivers 
  277.     are not passive, and will interfere with operation with some
  278.     of the SCSI drivers.
  279.  
  280. Section 1.7 :  Device detected, but unable to access.
  281.  
  282.     A SCSI device is detected by the kernel, but you are unable to
  283.     access it - ie mkfs /dev/sdc, tar xvf /dev/rst2, etc fails.
  284.  
  285.     You don't have a special file in /dev for the device.
  286.  
  287.     Unix devices are identified as either block or character (block 
  288.     devices go through the buffer cache, character devices do not) devices,
  289.     a major number (ie which driver is used - block major 8 corresponds
  290.     to SCSI disks) and a minor number (ie which unit is being accessed 
  291.     through a given driver - ie character major 4, minor 0 is the first 
  292.     virtual console, minor 1 the next, etc).  However, accessing devices 
  293.     through this separate namespace would break the unix/Linux metaphor of 
  294.     "everything is a file," so character and block device special files 
  295.     are created under /dev.  This lets you access the raw third SCSI disk
  296.     device as /dev/sdc, the first serial port as /dev/ttyS0, etc.  
  297.  
  298.     The preferred method for creating a file is using the MAKEDEV script -
  299.     cd /dev
  300.  
  301.     and run MAKEDEV (as root) for the devices you want to create - ie
  302.  
  303.     ./MAKEDEV sdc
  304.  
  305.     wildcards "should" work - ie
  306.  
  307.     ./MAKEDEV sd\*
  308.  
  309.     "should" create entries for all SCSI disk devices (doing this should 
  310.     create /dev/sda through /dev/sdp, with fifteen partition entries for 
  311.     each)
  312.  
  313.     ./MAKEDEV sdc\*
  314.  
  315.     "should" create entries for /dev/sdc and all fifteen permissible 
  316.     partitions on /dev/sdc, etc.
  317.  
  318.     I say "should" because this is the standard unix behavior - the MAKEDEV
  319.     script in your installation may not conform to this behavior, or may 
  320.     have restricted the number of devices it will create.
  321.  
  322.     If MAKEDEV won't do the right magic for you, you'll have to create the
  323.     device entries by hand with the mknod command.
  324.  
  325.     The block/character type, major, and minor numbers are specified for the
  326.     various SCSI devices in Subsection 4 : Device Files in the appropriate 
  327.     section.  
  328.  
  329.     Take those numbers, and use (as root)
  330.  
  331.     mknod /dev/device b|c major minor
  332.  
  333.     ie - 
  334.  
  335.     mknod /dev/sdc b 8 32
  336.     mknod /dev/rst0 c 9 0
  337.  
  338. Section 1.8 :   SCSI System Lockups
  339.  
  340.     This could be one of a number of things.  Also see the section for
  341.     your specific host adapter for possible further solutions.
  342.  
  343.     There are cases where the lockups seem to occur when multiple devices
  344.     are in use at the same time.  In this case, you can try contacting
  345.     the manufacturer of the devices and see if firmware upgrades are
  346.     available which would correct the problem.  If possible, try a
  347.     different scsi cable, or try on another system.  This can also
  348.     be caused by bad blocks on disks, or by bad handling of DMA by the
  349.     motherboard (for host adapters that do DMA).  There are probably
  350.      many other possible conditions that could lead to this type of event.
  351.  
  352.     Sometimes these problems occur when there are multiple devices in
  353.     use on the bus at the same time.  In this case, if your host
  354.     adapter driver supports more than one outstanding command on the bus
  355.     at one time, try reducing this to 1 and see if this helps. If you
  356.     have tape drives or slow cdrom drives on the bus, this might not be
  357.     a practical solution.
  358.  
  359. Section 1.9 : Configuring and building the kernel
  360.  
  361.     Unused SCSI drivers eat up valuable memory, aggravating 
  362.     memory shortage problems on small systems because kernel
  363.     memory is unpagable.
  364.  
  365.     So, you will want to build a kernel tuned for your
  366.     system, with only the drivers you need installed.
  367.  
  368.     cd to /usr/src/linux
  369.  
  370.     If you are using a root device other than the current
  371.     one, or something other than 80x25 VGA, and you are 
  372.     writing a boot floppy, you should edit the makefile, 
  373.     and make sure the 
  374.  
  375.         ROOT_DEV = 
  376.  
  377.     and 
  378.  
  379.         SVGA_MODE = 
  380.  
  381.     lines are the way you want them.
  382.  
  383.     If you've installed any patches, you may wish to guarantee that all
  384.     files are rebuilt.  If this is the case, you should type 
  385.  
  386.         make mrproper
  387.  
  388.     Irregardless of weather you ran make mrproper, type
  389.  
  390.         make config
  391.  
  392.     and answer the configuration questions.  Then run
  393.  
  394.         make depend
  395.  
  396.     and finally  
  397.  
  398.         make
  399.  
  400.     Once the build completes, you may wish to update the 
  401.     lilo configuration, or write a boot floppy.  A boot floppy
  402.     may be made by running
  403.  
  404.         make zdisk
  405.  
  406. Section 1.10 : LUNS other than 0 don't work
  407.  
  408.     Many SCSI devices are horrendously broken, lock the SCSI 
  409.     bus up solid, and do other bad things when you attempt to 
  410.     talk to them at a logical unit someplace other than zero.
  411.  
  412.     So, by default recent versions of the Linux kernel will not 
  413.     probe luns other than 0.  To work arround this, you need to 
  414.     the max_scsi_luns command line option, or recompile the kernel
  415.     wiuth the CONFIG_SCSI_MULTI_LUN option.
  416.  
  417.     Usually, you'll put 
  418.  
  419.         max_scsi_luns=8
  420.  
  421.     on your LILO command line.
  422.  
  423.     If your multi-LUN devices still aren't detected correctly after
  424.     trying one of these fixes (as the case will be with many old 
  425.     SCSI->MFM, RLL, ESDI, SMD, and similar bridge boards),  you'll
  426.     be thwarted by this piece of code 
  427.     
  428.                   /* Some scsi-1 peripherals do not handle lun != 0.
  429.                      I am assuming that scsi-2 peripherals do better */
  430.                   if((scsi_result[2] & 0x07) == 1 && 
  431.                      (scsi_result[3] & 0x0f) == 0) break;
  432.  
  433.     in scan_scsis() in drivers/scsi/scsi.c.  Delete this code, 
  434.     and you should be fine.
  435.  
  436. Section 2 : Reporting Bugs
  437.  
  438. The Linux SCSI developers don't necessarily maintain old revisions
  439. of the code due to space constraints.  So, if you are not running the
  440. latest publically released Linux kernel (note that many of the Linux
  441. distributions, such as MCC, SLS, Yggdrasil, etc. often lag one or even
  442. twenty patches behind this) chances are we will be unable to solve your 
  443. problem.  So, before reporting a bug, please check to see if it exists
  444. with the latest publically available kernel.
  445.  
  446. If after upgrading, and reading this document thoroughly, you still
  447. believe that you have a bug, please mail a bug report to the SCSI channel
  448. of the mailing list where it will be seen by many of the people who've 
  449. contributed to the Linux SCSI drivers.
  450.  
  451. In your bug report, please provide as much information as possible
  452. regarding your hardware configuration, the exact text of 
  453. all of the messages that Linux prints when it boots, when the 
  454. error condition occurs, and where in the source code the error
  455. is.  Use the procedures outlined in Section 2.1 : Capturing 
  456. messages and Section 2.2 : Locating the source of a panic().
  457.  
  458. Failure to provide the maximum possible amount of information 
  459. may result in misdiagnosis of your problem, or developers 
  460. deciding that there are other more interesting problems to 
  461. fix.
  462.  
  463. The bottom line is that if we can't reproduce your bug, and you can't 
  464. point at us what's broken, it won't get fixed.
  465.  
  466. Section 2.1 : Capturing messages
  467.  
  468. If you are not running a kernel message logging system :
  469.  
  470. Insure that the /proc filesystem is mounted.
  471.  
  472.     grep proc /etc/mtab
  473.  
  474. If the /proc filesystem is not mounted, mount it 
  475.  
  476.     mkdir /proc
  477.     chmod 755 /proc
  478.     mount -t proc /proc /proc
  479.  
  480. Copy the kernel revision and messages into a log file
  481.  
  482.     cat /proc/version > /tmp/log
  483.     cat /proc/kmsg >> /tmp/log
  484.  
  485. Type CNTRL-C after a second or two.
  486.  
  487. If you are running some logger, you'll have to poke through the 
  488. appropriate log files (/etc/syslog.conf should be of some use
  489. in locating them), or use dmesg.
  490.  
  491. If Linux is not yet bootstrapped, format a floppy diskette under DOS.  
  492. Note that if you have a distribution which mounts the root diskette off of 
  493. floppy rather than RAM drive, you'll have to format a diskette readable 
  494. in the drive not being used to mount root or use their ramdisk boot option.
  495.  
  496. Boot Linux off your distribution boot floppy, preferably in single user mode
  497. using a RAM disk as root.
  498.  
  499.     mkdir /tmp/dos
  500.  
  501. Insert the diskette in a drive not being used to mount root, and
  502. mount it.  Ie
  503.  
  504.     mount -t msdos /dev/fd0 /tmp/dos
  505.  
  506.     or 
  507.  
  508.     mount -t msdos /dev/fd1 /tmp/dos
  509.  
  510. Copy your log to it
  511.         
  512.         cp /tmp/log /tmp/dos/log
  513.  
  514. Unmount the DOS floppy
  515.  
  516.     umount /tmp/dos
  517.  
  518. And shutdown Linux
  519.  
  520.     shutdown
  521.  
  522. Reboot into DOS, and using your favorite communications software include
  523. the log file in your trouble mail.
  524.  
  525. Section 2.2 : Locating the source of a panic()
  526.  
  527. Like other unices, when a fatal error is encountered, Linux calls the 
  528. kernel panic() function.  Unlike other unices, Linux doesn't dump 
  529. core to the swap or dump device and reboot automatically.  Instead,
  530. a useful summary of state information is printed for the user to
  531. manually copy down.  Ie :
  532.  
  533.     Unable to handle kernel NULL pointer dereference at virtual address c0000004
  534.     current->tss,cr3 = 00101000, %cr3 = 00101000
  535.     *pde = 00102027
  536.     *pte = 00000027
  537.     Oops: 0000
  538.     EIP:    0010:0019c905
  539.     EFLAGS: 00010002
  540.     eax: 0000000a   ebx: 001cd0e8   ecx: 00000006   edx: 000003d5
  541.     esi: 001cd0a8   edi: 00000000   ebp: 00000000   esp: 001a18c0
  542.     ds: 0018   es: 0018   fs: 002b   gs: 002b   ss: 0018
  543.     Process swapper (pid: 0, process nr: 0, stackpage=001a09c8)
  544.     Stack: 0019c5c6 00000000 0019c5b2 00000000 0019c5a5 001cd0a8 00000002 00000000
  545.        001cd0e8 001cd0a8 00000000 001cdb38 001cdb00 00000000 001ce284 0019d001
  546.        001cd004 0000e800 fbfff000 0019d051 001cd0a8 00000000 001a29f4 00800000
  547.     Call Trace: 0019c5c6 0019c5b2 0018c5a5 0019d001 0019d051 00111508 00111502
  548.        0011e800 0011154d 00110f63 0010e2b3 0010ef55 0010ddb7
  549.     Code: 8b 57 04 52 68 d2 c5 19 00 e8 cd a0 f7 ff 83 c4 20 8b 4f 04
  550.     Aiee, killing interrupt handler
  551.     kfree of non-kmalloced memory: 001a29c0, next= 00000000, order=0
  552.     task[0] (swapper) killed: unable to recover
  553.     Kernel panic: Trying to free up swapper memory space
  554.     In swapper task - not syncing
  555.  
  556. Take the hexidecimal number on the EIP: line, in this case 19c905, and search
  557. through /usr/src/linux/zSystem.map for the highest number not larger than
  558. that address.  Ie,
  559.  
  560.     0019a000 T _fix_pointers
  561.     0019c700 t _intr_scsi
  562.     0019d000 t _NCR53c7x0_intr
  563.  
  564. That tells you what function its in.  Recompile the source file which 
  565. defines that function file with debugging enabled, or the whole kernel 
  566. if you prefer by editing /usr/src/linux/Makefile and adding a "-g" 
  567. to the CFLAGS definition.
  568.  
  569.     #
  570.     # standard CFLAGS
  571.     #
  572.  
  573. Ie, 
  574.  
  575.     CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe
  576.  
  577. becomes
  578.  
  579.     CFLAGS = -g -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe
  580.  
  581. Rebuild the kernel, incrementally or by doing a 
  582.  
  583.     make clean
  584.     make
  585.  
  586. Make the kernel bootable by creating an entry in your /etc/lilo.conf
  587. for it
  588.  
  589.     image = /usr/src/linux/zImage
  590.     label = experimental
  591.  
  592. and re-running LILO as root, or by creating a boot floppy
  593.  
  594.     make zImage 
  595.  
  596. Reboot and record the new EIP for the error.
  597.  
  598. If you have script installed, you may want to start it, as 
  599. it will log your debugging session to the typescript file.
  600.  
  601. Now, run 
  602.  
  603.     gdb /usr/src/linux/tools/zSystem
  604.  
  605. and enter 
  606.  
  607.     info line *<your EIP>
  608.  
  609. Ie, 
  610.     info line *0x19c905
  611.  
  612. To which GDB will respond something like
  613.  
  614.     (gdb) info line *0x19c905
  615.     Line 2855 of "53c7,8xx.c" starts at address 0x19c905 <intr_scsi+641>
  616.        and ends at 0x19c913 <intr_scsi+655>.
  617.  
  618. Record this information.  Then, enter
  619.     list <line number>
  620.  
  621. Ie,
  622.  
  623.     (gdb) list 2855
  624.     2850    /*      printk("scsi%d : target %d lun %d unexpected disconnect\n",
  625.     2851                host->host_no, cmd->cmd->target, cmd->cmd->lun); */
  626.     2852            printk("host : 0x%x\n", (unsigned) host);
  627.     2853            printk("host->host_no : %d\n", host->host_no);
  628.     2854            printk("cmd : 0x%x\n", (unsigned) cmd);
  629.     2855            printk("cmd->cmd : 0x%x\n", (unsigned) cmd->cmd);
  630.     2856            printk("cmd->cmd->target : %d\n", cmd->cmd->target);
  631.     2857            if (cmd) {
  632.     2858                abnormal_finished(cmd, DID_ERROR << 16);
  633.     2859            }
  634.     2860            hostdata->dsp = hostdata->script + hostdata->E_schedule / 
  635.     2861                sizeof(long);
  636.     2862            hostdata->dsp_changed = 1;
  637.     2863        /* SCSI PARITY error */
  638.     2864        } 
  639.     2865
  640.     2866        if (sstat0_sist0 & SSTAT0_PAR) {
  641.     2867            fatal = 1;
  642.     2868            if (cmd && cmd->cmd) {
  643.     2869                printk("scsi%d : target %d lun %d parity error.\n",
  644.  
  645. Obviously, quit will take you out of GDB.
  646.  
  647. Record this information too, as it will provide a context incase the 
  648. developers' kernels differ from yours.
  649.  
  650. Section 3 : Modules
  651.  
  652. This section gives specific details regarding the support for loadable
  653. kernel modules and how it relates to SCSI.
  654.  
  655. Section 3.1 : General Information
  656.  
  657. Loadable modules are a means by which the user or system administrator
  658. can load files into the kernel's memory in such a way that the kernel's
  659. capabilities are expanded.  The most common usages of modules are for
  660. drivers to support hardware, or to load filessytems.
  661.  
  662. There are several advantages of modules for SCSI.  One is that a
  663. system administrator trying to maintain a large number of machines can
  664. use a single kernel image for all of the machines, and then load
  665. kernel modules to support hardware that is only present on some
  666. machines.
  667.  
  668. It is also possible for someone trying to create a distribution to use
  669. a script on the bootable floppy to query for which modules to be
  670. loaded.  This saves memory that would otherwise be wasted on unused
  671. drivers, and it would also reduce the possibility that a probe for a
  672. non-existant card would screw up some other card on the system.
  673.  
  674. Modules also work out nicely on laptops, which tend to have less
  675. memory than desktop machines, and people tend to want to keep the
  676. kernel image as small as possible and load modules as required.  Also,
  677. modules makes supporting PCMCIA SCSI cards on laptops somewhat easier,
  678. since you can load and unload the driver as the card is
  679. inserted/removed. [Note: currently the qlogic and 152x drivers support
  680. PCMCIA].
  681.  
  682. Finally, there is the advantage that kernel developers can more easily
  683. debug and test their drivers, since testing a new driver does not
  684. require rebooting the machine (provided of course that the machine has
  685. not completely crashed as a result of some bug in the driver).
  686.  
  687. Although modules are very nice, there is one limitation.  If your root
  688. disk partition is on a scsi device, you will not be able to use
  689. modularized versions of scsi code required to access the disk.  This
  690. is because the system must be able to mount the root partition before
  691. it can load any modules from disk.  There are people thinking about
  692. ways of fixing the loader and the kernel so that the kernel can
  693. self-load modules prior to attempting to mount the root filesystem,
  694. so at some point in the future this limitation may be lifted.
  695.  
  696. Section 3.2 : Module support in the 1.2.N kernel.
  697.  
  698. In the 1.2.N series of kernels, there is partial support for SCSI
  699. kernel modules.  While none of the high level drivers (such as disk,
  700. tape, etc) can be used as modules, most of the low level drivers
  701. (i.e. 1542, 1522) can be loaded and unloaded as required.  Each time
  702. you load a low-level driver, the driver first searches for cards that
  703. can be driven.  Next, the bus is scanned for each card that is found,
  704. and then the internal data structures are set up so as to make it
  705. possible to actually use the devices attached to the cards that the
  706. driver is managing.
  707.  
  708.     When you are through with a low-level driver, you can unload
  709. it.  You should keep in mind that usage counts are maintained based upon
  710. mounted filesystems, open files, etc, so that if you are still using a
  711. device that the driver is managing, the rmmod utillity will tell you that
  712. the device is still busy and refuse to unload the driver.  When the driver
  713. is unloaded, all of the associated data structures are also freed so that
  714. the system state should be back to where it was before the module was loaded.
  715. This means that the driver could be reloaded at a later time if required.
  716.  
  717. Section 3.3 : Module support in the 1.3.N kernel.
  718.  
  719. In the 1.3 series of kernels, the scsi code is completely modularized.
  720. This means that you can start with a kernel that has no scsi support
  721. whatsoever, and start loading modules and you will eventually end up
  722. with complete support.
  723.  
  724. If you wish, you can compile some parts of the SCSI code into the kernel
  725. and then load other parts later - it is all up to you how much gets loaded
  726. at runtime and how much is linked directly into the kernel.
  727.  
  728. If you are starting with a kernel that has no support whatsoever for
  729. SCSI, then the first thing you will need to do is to load the scsi
  730. core into the kernel - this is in a module called "scsi_mod".  You
  731. will not be able to load any other scsi modules until you have this
  732. loaded into kernel memory.  Since this does not contain any low-level
  733. drivers, the act of loading this module will not scan any busses, nor
  734. will it activate any drivers for scsi disks, tapes, etc.  If you answered
  735. 'Y' to the CONFIG_SCSI question when you built your kernel, you will not
  736. need to load this module.
  737.  
  738. At this point you can add modules in more or less any order to achieve
  739. the desired functionality.  Usage counts are interlocks are used to
  740. prevent unloading of any component which might still be in use, and
  741. you will get a message from rmmod if a module is still busy.
  742.  
  743. The high level drivers are in modules named "sd_mod", "sr_mod", "st",
  744. and "sg", for disk, cdrom, tape, and scsi generics support
  745. respectively.  When you load a high level driver, the device list for
  746. all attached hosts is examined for devices which the high level driver
  747. can drive, and these are automatically activated.
  748.  
  749. The use of modules with low level drivers were described in the
  750. Section 3.2.  When a low-level driver is loaded, the bus is scanned,
  751. and each device is examined by each of the high level drivers to see
  752. if they recognize it as something that they can drive - anything
  753. recognized is automatically attached and activated.
  754.  
  755. Section 4 : Hosts
  756.  
  757. This section gives specific information about the various host adapters that
  758. are supported in some way or another under linux.
  759.  
  760. Section 4.1 : Supported and Unsupported Hardware
  761. Drivers in the distribution kernel :
  762.  
  763. Adaptec 152x, Adaptec 154x (DTC 329x boards usually work, but are unsupported),
  764. Adaptec 174x, Adaptec 274x/284x (294x support requires a newer version of the
  765. driver), BusLogic MultiMaster Host Adapters, EATA-DMA and EATA-PIO protocol 
  766. compilant boards (DPT PM2001, PM2011, PM2012A, PM2012B, PM2021, PM2022, PM2024,
  767. PM2122, PM2124, PM2322, PM2041, PM2042, PM2044, PM2142, PM2144, PM2322, PM3021,
  768. PM3122, PM3222, PM3224, PM3334 some boards from NEC, AT&T, SNI, AST, Olivetti,
  769. and Alphatronix), Future Domain 850, 885, 950, and other boards in that series 
  770. (but not the 840, 841, 880, and 881 boards unless you make the appropriate 
  771. patch), Future Domain 16x0 with TMC-1800, TMC-18C30, or TMC-18C50 chips, 
  772. NCR53c8xx,PAS16 SCSI ports, Seagate ST0x, Trantor T128/T130/T228 boards, 
  773. Ultrastor 14F, 24F, and 34F, and Western Digital 7000.
  774.  
  775. MCA : 
  776.  
  777. MCA boards which are compatable with a supported board (ie,
  778. Adaptec 1640 and BusLogic 640) will work.
  779.  
  780. Alpha drivers :
  781.  
  782. Many ALPHA drivers are available at
  783.    ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi
  784.  
  785. Drivers which will work with modifications
  786.  
  787. NCR53c8x0/7x0:
  788.  
  789.     A NCR53c8xx driver has been developed, but currently will not work
  790.     with NCR53c700, NCR53c700-66, NCR53c710, and NCR53c720 chips.  A list
  791.     of changes needed to make each of these chips work follows, as well
  792.     as a summary of the complexity.
  793.  
  794.     NCR53c720 (trivial) - detection changes, initializaion changes, change
  795.         fixup code to translate '810 register addresses to 
  796.     '7xx mapping.
  797.  
  798.     NCR53c710 (trivial) - detection changes, initialization changes, 
  799.     of assembler, change fixup code to translate '810 register 
  800.     addresses to '7xx mapping, change interrupt handlers to treat
  801.     IID interrupt from INTFLY instruction to emulate it.
  802.  
  803.     NCR53c700, NCR53c700-66 (very messy) - detection changes, 
  804.         initialization changes, modification of NCR code to not use DSA, 
  805.     modification of Linux code to handle context switches.
  806.  
  807. SCSI hosts that will not work :
  808.  
  809. All parallel->SCSI adapters, Rancho SCSI boards, and Grass Roots SCSI
  810. boards.  BusLogic FlashPoint boards, such as the BT-930/932/950, are
  811. currently unsupported.
  812.  
  813. SCSI hosts that will NEVER work :
  814.  
  815. Non Adaptec compatable, non NCR53c8xx DTC boards (including the 3270 and 3280).
  816.  
  817. CMD SCSI boards.
  818.  
  819. Aquiring programming information requires a non-disclosure agreement
  820. with DTC/CMD.  This means that it would be impossible to distribute a 
  821. Linux driver if one were written, since complying with the NDA would
  822. mean distributing no source, in violation of the GPL, and complying 
  823. with the GPL would mean distributing source, in violation of the NDA.  
  824.  
  825. If you want to run Linux on some other unsupported piece of hardware, your 
  826. options are to either write a driver yourself (Eric Youngdale and I are 
  827. usually willing to answer technical questions concerning the Linux
  828. SCSI drivers) or to commision a driver (Normal consulting rates 
  829. mean that this will not be a viable option for personal use).
  830.  
  831. Section 4.1.1 : Multiple host adapters
  832.  
  833. With some host adapters (see Section 9.7 : Buyers' Guide : 
  834. Feature Comparison), you can use multiple host adapters of the 
  835. same type in the same system.  With multiple adapters of the
  836. same type in the same system, generally the one at the lowest 
  837. address will be scsi0, the one at the next address scsi1, etc.
  838.  
  839. In all cases, it is possible to use multiple host adapters of 
  840. different types, provided that none of their addresses conflict.  
  841. SCSI controllers are scanned in the order specified in the 
  842. builtin_scsi_hosts[] array in drivers/scsi/hosts.c, with
  843. the order currently being 
  844.  
  845.     BusLogic, Ultrastor 14/34F, Ultrastor 14F,, Adaptec 151x/152x,
  846.     Adaptec 154x, Adaptec 174x, AIC7XXX, AM53C974, Future Domain 16x0,
  847.     Allways IN2000, Generic NCR5380, QLOGIC, PAS16, Seagate,
  848.     Trantor T128/T130, NCR53c8xx, EATA-DMA, WD7000, debugging driver.
  849.  
  850. In most cases (ie, you aren't trying to use both BusLogic and Adaptec drivers),
  851. this can be changed to suit your needs (ie, keeping the same devices when new
  852. SCSI devices are added to the system on a new controller) by moving the
  853. individual entries.
  854.  
  855. Section 4.2 : Common Problems 
  856. Section 4.2.1 : SCSI timeouts 
  857.     Make sure interrupts are enabled correctly, and there are no 
  858.     IRQ, DMA, or address conflicts with other boards.
  859.  
  860. Section 4.2.2 : Failure of autoprobe routines on boards that rely on 
  861.     BIOS for autoprobe.
  862.  
  863.     If your SCSI adapter is one of the following :
  864.  
  865.         Adaptec 152x, Adaptec 151x, Adaptec AIC-6260,
  866.         Adaptec AIC-6360, Future Domain 1680, Future Domain TMC-950,
  867.         Future Domain TMC-8xx, Trantor T128, Trantor T128F, 
  868.         Trantor T228F, Seagate ST01, Seagate ST02, or a 
  869.         Western Digital 7000
  870.  
  871.     and it is not detected on bootup, ie you get a 
  872.  
  873.         scsi : 0 hosts
  874.  
  875.     message or a 
  876.  
  877.         scsi%d : type
  878.  
  879.     message is not printed for each supported SCSI adapter installed
  880.     in the system, you may have a problem with the autoprobe routine
  881.     not knowing about your board.
  882.  
  883.     Autodetection will fail for drivers using the BIOS for autodetection
  884.     if the BIOS is disabled.  Double check that your BIOS is enabled,
  885.     and not conflicting with any other peripherial BIOSes.
  886.  
  887.     Autodetection will also fail if the board's "signature" and/or 
  888.     BIOS address don't match known ones.
  889.  
  890.     If the BIOS is installed, please use DOS and DEBUG to 
  891.     find a signature that will detect your board -
  892.  
  893.     Ie, if your board lives at 0xc8000, under DOS do
  894.  
  895.     debug
  896.     d c800:0
  897.     q
  898.  
  899.     and send a message to the SCSI channel of the mailing list with
  900.     the ASCII message, with the length and offset from the base 
  901.     address (ie, 0xc8000).  Note that the EXACT text is required,
  902.     and you should provide both the hex and ASCII portions of 
  903.     the text.
  904.  
  905.     If no BIOS is installed, and you are using an Adaptec 152x,
  906.     Trantor T128, or Seagate driver, you can use command line 
  907.     or compile time overrides to force detection.
  908.  
  909.     Please consult the appropriate subsection for your SCSI board 
  910.     as well as Section 1.1 : 
  911.  
  912.  
  913. Section 4.2.3 : Failure of boards using memory mapped I/O
  914.  
  915.     (This include the Trantor T128 and Seagate boards, but not the 
  916.     Adaptec, Generic NCR5380, PAS16, and Ultrastor drivers)
  917.  
  918.     This is often caused when the memory mapped I/O ports 
  919.     are incorrectly cached.  You should have the board's 
  920.     address space marked as uncachable in the XCMOS settings.
  921.  
  922.     If this is not possible, you will have to disable cache 
  923.     entirely.
  924.  
  925.         If you have manually specified the address of the board,
  926.         remember that Linux needs the actual address of the board,
  927.         and not the 16 byte segment the documentation may refer to.
  928.  
  929.         Ie, 0xc8000 would be correct, 0xc800 would not work
  930.         and could cause memory corruption.
  931.  
  932. Section 4.2.4 : "kernel panic : cannot mount root device" when booting
  933.     an ALPHA driver boot floppy
  934.  
  935.     You'll need to edit the binary image of the kernel (before
  936.     or after writing it out to disk), and modify a few two byte 
  937.     fields (little endian) to gurantee that it will work on your 
  938.     system.  
  939.  
  940.     1.  default swap device at offset 502, this should be set to 0x00 0x00
  941.  
  942.     2.  ram disk size at offset 504, this should be set to the size
  943.         of the boot floppy in K - ie, 5.25" = 1200, 3.5" = 1440.
  944.  
  945.         This means the bytes are 
  946.  
  947.         3.5" : 0xA0 0x05 
  948.         5.25" : 0xB0  0x04
  949.  
  950.     3.  root device offset at 508, this should be 0x00 0x00, ie the boot
  951.         device. 
  952.  
  953.     dd or rawrite the file to a disk.  Insert the disk in the
  954.     first floppy drive, wait until it prompts you to insert
  955.     the root disk, and insert the root floppy from your 
  956.     distribution.
  957.  
  958.  
  959. Section 4.2.5 : Installing a device driver not included with the distribution 
  960.     kernel
  961.  
  962.     You need to start with the version of the kernel used by the 
  963.     driver author.  This revision may be alluded to in the documentation
  964.     included with the driver.
  965.  
  966.     Various recent kernel revisions can be found at 
  967.         nic.funet.fi:/pub/OS/Linux/PEOPLE/Linus
  968.  
  969.     as linux-version.tar.gz
  970.  
  971.     They are also mirrored at tsx-11.mit.edu and various other sites.
  972.  
  973.     cd to /usr/src.
  974.  
  975.     Remove your old Linux sources, if you want to keep a backup copy
  976.     of them
  977.  
  978.     mv linux linux-old
  979.  
  980.     Untar the archive
  981.  
  982.     gunzip < linux-0.99.12.tar.gz | tar xvfp -
  983.  
  984.     Apply the patches.  The patches will be relative to some directory
  985.     in the filesystem.  By examining the output file lines in the patch
  986.     file (grep for ^---), you can tell where this is - ie patches with 
  987.     these lines
  988.  
  989.     --- ./kernel/blk_drv/scsi/Makefile
  990.  
  991.     --- ./config.in Wed Sep  1 16:19:33 1993
  992.  
  993.  
  994.     would have the files relative to /usr/src/linux.
  995.  
  996.     Untar the driver sources at an appropriate place - you
  997.     can type
  998.  
  999.     tar tfv patches.tar 
  1000.  
  1001.     to get a listing, and move files as necessary (The SCSI driver files 
  1002.     should live in /usr/src/linux/kernel/drivers/scsi)
  1003.  
  1004.     Either cd to the directory they are relative to and type
  1005.  
  1006.     patch -p0 < patch_file
  1007.  
  1008.     or tell patch to strip off leading path components.  Ie,
  1009.     if the files started with
  1010.  
  1011.     --- linux-new/kernel/blk_drv/scsi/Makefile 
  1012.  
  1013.     and you wanted to apply them while in /usr/src/linux, you 
  1014.     could cd to /usr/src/linux and type
  1015.  
  1016.     patch -p1 <  patches 
  1017.  
  1018.     to strip off the "linux-new" component.
  1019.  
  1020.     After you have applied the patches, look for any patch rejects,
  1021.     which will be the name of the rejected file with a # suffix appended.
  1022.  
  1023.     find /usr/src/linux/ -name "*#" -print 
  1024.  
  1025.     If any of these exist, look at them.  In some cases, the 
  1026.     differences will be in RCS identifiers and will be harmless,
  1027.     in other cases, you'll have to manually apply important 
  1028.     parts.  Documentation on diff files and patch is beyond the
  1029.     scope of this document.
  1030.  
  1031.     See also Section 1.8 : Configuring and building the kernel
  1032.  
  1033. Section 4.2.6 :  Installing a driver that has no patches
  1034.  
  1035.     In some cases, a driver author may not offer patches with 
  1036.     the .c and .h files which comprise his driver, or the patches
  1037.     may be against an older revision of the kernel and not go 
  1038.     in cleanly. 
  1039.  
  1040.     1.  Copy the .c and .h files into /usr/src/linux/drivers/scsi
  1041.  
  1042.     2.  Add the configuration option
  1043.  
  1044.         Edit /usr/src/linux/config.in, and add a line in the 
  1045.  
  1046.             *
  1047.             * SCSI low-level drivers
  1048.             *
  1049.  
  1050.         section, add a boolean configuration variable for your
  1051.         driver.  Ie,
  1052.  
  1053.         bool 'Allways IN2000 SCSI support' CONFIG_SCSI_IN2000 y
  1054.  
  1055.     3.  Add the makefile entries
  1056.  
  1057.         Edit /usr/src/linux/drivers/scsi/Makefile, and add 
  1058.         an entry like 
  1059.  
  1060.         ifdef CONFIG_SCSI_IN2000
  1061.         SCSI_OBS := $(SCSI_OBJS) in2000.o
  1062.         SCSI_SRCS := $(SCSI_SRCS) in2000.c
  1063.         endif
  1064.  
  1065.         before the 
  1066.  
  1067.         scsi.a: $(SCSI_OBJS)
  1068.  
  1069.         line in the makefile, where the .c file is the .c
  1070.         file you copied in, and the .o file is the basename
  1071.         of the .c file with a .o suffixed.
  1072.  
  1073.     4.  Add the entry points
  1074.  
  1075.         Edit /usr/src/linux/drivers/scsi/hosts.c, and 
  1076.         add a #inlclude for the header file, conditional
  1077.         on the CONFIG_SCSI preprocessor define you
  1078.         added to the configuration file.  Ie, after 
  1079.  
  1080.         #ifdef CONFIG_SCSI_GENERIC_NCR5380
  1081.         #include "g_NCR5380.h"
  1082.         #endif
  1083.  
  1084.         you might add 
  1085.  
  1086.         #ifdef CONFIG_SCSI_IN2000
  1087.         #include "in2000.h"
  1088.         #endif
  1089.  
  1090.         You will also need to add the Scsi_Host_Template 
  1091.         entry into the scsi_hosts[] array.  Take a look
  1092.         into the .h file, and you should find a #define that
  1093.         looks something like this : 
  1094.  
  1095.         #define IN2000 {"Always IN2000", in2000_detect, \
  1096.                 in2000_info, in2000_command,    \
  1097.                 in2000_queuecommand,            \
  1098.                 in2000_abort,                   \
  1099.                 in2000_reset,                   \
  1100.                 NULL,                           \
  1101.                 in2000_biosparam,               \
  1102.                 1, 7, IN2000_SG, 1, 0, 0}
  1103.  
  1104.         the name of the preprocessor define, and add 
  1105.         it into the scsi_hosts[] array, conditional on
  1106.         definition of the preprocessor symbol you used 
  1107.         in the configuration file.
  1108.  
  1109.         Ie, after 
  1110.  
  1111.         #ifdef CONFIG_SCSI_GENERIC_NCR5380
  1112.                 GENERIC_NCR5380,
  1113.         #endif
  1114.  
  1115.         you might add
  1116.  
  1117.         #ifdef CONFIG_SCSI_IN2000
  1118.             IN2000,
  1119.         #endif
  1120.  
  1121.     See also Section 1.8 : Configuring and building the kernel
  1122.  
  1123. Section 4.2.7 : Failure of a PCI board in a Compaq System
  1124.  
  1125.     A number of Compaq systems map the 32-bit BIOS extensions used
  1126.     to probe for PCI devices into memory which is inaccessable to
  1127.     the Linux kernel due to the memory layout.  If Linux is 
  1128.     unable to detect a supported PCI SCSI board, and the 
  1129.     kernel tells you something like
  1130.  
  1131.     pcibios_init: entry in high memory, unable to access
  1132.  
  1133.     Grab
  1134.  
  1135.         ftp://ftp.compaq.com/pub/softpaq/Software-Solutions/sp0921.zip
  1136.  
  1137.     which is a self-extracting archive of a program which will
  1138.     relocate the BIOS32 code.
  1139.  
  1140. Section 4.2.8 : A SCSI system with PCI boards hangs after the 
  1141.     %d Hosts message
  1142.  
  1143.     Some PCI systems have broken BIOSes which disable interrupts
  1144.     and fail to renable them before returning control to the 
  1145.     caller.  The following patch fixes this
  1146.  
  1147. --- bios32.c.orig    Mon Nov 13 22:35:31 1995
  1148. +++ bios32.c    Thu Jan 18 00:15:09 1996
  1149. @@ -56,6 +56,7 @@
  1150.  #include <linux/pci.h>
  1151.  
  1152.  #include <asm/segment.h>
  1153. +#include <asm/system.h>
  1154.  
  1155.  #define PCIBIOS_PCI_FUNCTION_ID     0xb1XX
  1156.  #define PCIBIOS_PCI_BIOS_PRESENT     0xb101
  1157. @@ -125,7 +126,9 @@
  1158.      unsigned long address;        /* %ebx */
  1159.      unsigned long length;        /* %ecx */
  1160.      unsigned long entry;        /* %edx */
  1161. +    unsigned long flags;
  1162.  
  1163. +    save_flags(flags);
  1164.      __asm__("lcall (%%edi)"
  1165.          : "=a" (return_code),
  1166.            "=b" (address),
  1167. @@ -134,6 +137,7 @@
  1168.          : "0" (service),
  1169.            "1" (0),
  1170.            "D" (&bios32_indirect));
  1171. +    restore_flags(flags);
  1172.  
  1173.      switch (return_code) {
  1174.          case 0:
  1175. @@ -161,11 +165,13 @@
  1176.      unsigned char present_status;
  1177.      unsigned char major_revision;
  1178.      unsigned char minor_revision;
  1179. +    unsigned long flags;
  1180.      int pack;
  1181.  
  1182.      if ((pcibios_entry = bios32_service(PCI_SERVICE))) {
  1183.          pci_indirect.address = pcibios_entry;
  1184.  
  1185. +        save_flags(flags);
  1186.          __asm__("lcall (%%edi)\n\t"
  1187.              "jc 1f\n\t"
  1188.              "xor %%ah, %%ah\n"
  1189. @@ -176,6 +182,7 @@
  1190.              : "1" (PCIBIOS_PCI_BIOS_PRESENT),
  1191.                "D" (&pci_indirect)
  1192.              : "bx", "cx");
  1193. +        restore_flags(flags);
  1194.  
  1195.          present_status = (pack >> 16) & 0xff;
  1196.          major_revision = (pack >> 8) & 0xff;
  1197. @@ -210,7 +217,9 @@
  1198.  {
  1199.      unsigned long bx;
  1200.      unsigned long ret;
  1201. +    unsigned long flags;
  1202.  
  1203. +    save_flags(flags);
  1204.      __asm__ ("lcall (%%edi)\n\t"
  1205.          "jc 1f\n\t"
  1206.          "xor %%ah, %%ah\n"
  1207. @@ -221,6 +230,7 @@
  1208.            "c" (class_code),
  1209.            "S" ((int) index),
  1210.            "D" (&pci_indirect));
  1211. +    restore_flags(flags);
  1212.      *bus = (bx >> 8) & 0xff;
  1213.      *device_fn = bx & 0xff;
  1214.      return (int) (ret & 0xff00) >> 8;
  1215. @@ -232,7 +242,9 @@
  1216.  {
  1217.      unsigned short bx;
  1218.      unsigned short ret;
  1219. +    unsigned long flags;
  1220.  
  1221. +    save_flags(flags);
  1222.      __asm__("lcall (%%edi)\n\t"
  1223.          "jc 1f\n\t"
  1224.          "xor %%ah, %%ah\n"
  1225. @@ -244,6 +256,7 @@
  1226.            "d" (vendor),
  1227.            "S" ((int) index),
  1228.            "D" (&pci_indirect));
  1229. +    restore_flags(flags);
  1230.      *bus = (bx >> 8) & 0xff;
  1231.      *device_fn = bx & 0xff;
  1232.      return (int) (ret & 0xff00) >> 8;
  1233. @@ -254,7 +267,9 @@
  1234.  {
  1235.      unsigned long ret;
  1236.      unsigned long bx = (bus << 8) | device_fn;
  1237. +    unsigned long flags;
  1238.  
  1239. +    save_flags (flags);
  1240.      __asm__("lcall (%%esi)\n\t"
  1241.          "jc 1f\n\t"
  1242.          "xor %%ah, %%ah\n"
  1243. @@ -273,7 +288,9 @@
  1244.  {
  1245.      unsigned long ret;
  1246.      unsigned long bx = (bus << 8) | device_fn;
  1247. +    unsigned long flags;
  1248.  
  1249. +    save_flags(flags);
  1250.      __asm__("lcall (%%esi)\n\t"
  1251.          "jc 1f\n\t"
  1252.          "xor %%ah, %%ah\n"
  1253. @@ -292,7 +309,9 @@
  1254.  {
  1255.      unsigned long ret;
  1256.      unsigned long bx = (bus << 8) | device_fn;
  1257. +    unsigned long flags;
  1258.  
  1259. +    save_flags(flags);
  1260.      __asm__("lcall (%%esi)\n\t"
  1261.          "jc 1f\n\t"
  1262.          "xor %%ah, %%ah\n"
  1263. @@ -303,6 +322,7 @@
  1264.            "b" (bx),
  1265.            "D" ((long) where),
  1266.            "S" (&pci_indirect));
  1267. +    restore_flags(flags);
  1268.      return (int) (ret & 0xff00) >> 8;
  1269.  }
  1270.  
  1271. @@ -311,7 +331,9 @@
  1272.  {
  1273.      unsigned long ret;
  1274.      unsigned long bx = (bus << 8) | device_fn;
  1275. +    unsigned long flags;
  1276.  
  1277. +    save_flags(flags);
  1278.      __asm__("lcall (%%esi)\n\t"
  1279.          "jc 1f\n\t"
  1280.          "xor %%ah, %%ah\n"
  1281. @@ -322,6 +344,7 @@
  1282.            "b" (bx),
  1283.            "D" ((long) where),
  1284.            "S" (&pci_indirect));
  1285. +    restore_flags(flags);
  1286.      return (int) (ret & 0xff00) >> 8;
  1287.  }
  1288.  
  1289. @@ -330,7 +353,9 @@
  1290.  {
  1291.      unsigned long ret;
  1292.      unsigned long bx = (bus << 8) | device_fn;
  1293. +    unsigned long flags;
  1294.  
  1295. +    save_flags(flags);
  1296.      __asm__("lcall (%%esi)\n\t"
  1297.          "jc 1f\n\t"
  1298.          "xor %%ah, %%ah\n"
  1299. @@ -341,6 +366,7 @@
  1300.            "b" (bx),
  1301.            "D" ((long) where),
  1302.            "S" (&pci_indirect));
  1303. +    restore_flags(flags);
  1304.      return (int) (ret & 0xff00) >> 8;
  1305.  }
  1306.  
  1307. @@ -349,7 +375,9 @@
  1308.  {
  1309.      unsigned long ret;
  1310.      unsigned long bx = (bus << 8) | device_fn;
  1311. +    unsigned long flags;
  1312.  
  1313. +    save_flags(flags);
  1314.      __asm__("lcall (%%esi)\n\t"
  1315.          "jc 1f\n\t"
  1316.          "xor %%ah, %%ah\n"
  1317. @@ -360,6 +388,7 @@
  1318.            "b" (bx),
  1319.            "D" ((long) where),
  1320.            "S" (&pci_indirect));
  1321. +    restore_flags(flags);
  1322.      return (int) (ret & 0xff00) >> 8;
  1323.  }
  1324.  
  1325. Section 4.3 : Adaptec 152x, 151x, 1505, 282x, Sound Blaster 16 SCSI, SCSI Pro, 
  1326.     Gigabyte, and other AIC 6260/6360 based products (Standard)
  1327. Supported Configurations :
  1328. BIOS addresses : 0xd8000, 0xdc000, 0xd0000, 0xd4000, 0xc8000, 0xcc000, 0xe0000,
  1329.     0xe4000.
  1330. Ports : 0x140, 0x340
  1331. IRQs : 9, 10, 11, 12
  1332. DMA is not used
  1333. IO : port mapped
  1334.  
  1335. Autoprobe :
  1336.  
  1337.     Works with many boards with an installed BIOS.  All
  1338.     other boards, including the Adaptec 1510, and Sound Blaster16 SCSI 
  1339.     must use a kernel command line or compile time override.
  1340.  
  1341. Autoprobe Override :
  1342. Compile time : 
  1343. Define PORTBASE, IRQ, SCSI_ID, RECONNECT, PARITY as appropriate, see Defines
  1344.  
  1345. kernel command line : aha152x=<PORTBASE>[,<IRQ>[,<SCSI-ID>[,<RECONNECT>[,<PARITY>]]]]
  1346.  
  1347. SCSI-ID is the SCSI ID of the HOST adapter, not of any devices you have installed
  1348. on it.  Usually, this should be 7.
  1349.  
  1350. To force detection at 0x340, IRQ 11, at SCSI-ID 7, allowing 
  1351. disconnect/reconnect, you would use the following command line 
  1352. option : 
  1353.  
  1354. aha152x=0x340,11,7,1
  1355.  
  1356. Antiquity Problems, fix by upgrading : 
  1357. 1.  The driver fails with VLB boards.  There was a timing problem
  1358.     in kernels older than revision 1.0.5.
  1359.  
  1360. Defines : 
  1361. AUTOCONF      : use configuration the controller reports (only 152x)
  1362. IRQ           : override interrupt channel (9,10,11 or 12) (default 11)
  1363. SCSI_ID       : override SCSI ID of AIC-6260 (0-7) (default 7)
  1364. RECONNECT     : override target disconnect/reselect (set to non-zero to 
  1365.         allow, zero to disable)
  1366. DONT_SNARF     : Don't register ports (pl12 and below)
  1367. SKIP_BIOSTEST  : Don't test for BIOS signature (AHA-1510 or disabled BIOS)
  1368. PORTBASE       : Force port base. Don't try to probe
  1369.  
  1370. Section 4.4 : Adaptec 154x, AMI FastDisk VLB, DTC 329x (Standard)  
  1371. Supported Configurations :
  1372. Ports : 0x330 and 0x334 
  1373. IRQs : 9, 10, 11, 12, 14, 15
  1374. DMA channels : 5, 6, 7
  1375. IO : port mapped, bus master
  1376.  
  1377. Autoprobe : will detect boards at 0x330 and 0x334 only.
  1378.  
  1379. Autoprobe override : 
  1380.    aha1542=<PORTBASE>[,<BUSON>,<BUSOFF>[,<DMASPEED>]]
  1381.  
  1382. Note: No-suffix boards, and early 'A' suffix boards do not support 
  1383.     scatter/gather, and thus don't work.  However, they can be made to 
  1384.     work for some definition of the word works if AHA1542_SCATTER is 
  1385.     changed to 0 in drivers/scsi/aha1542.h.
  1386.  
  1387. Note: BusLogic makes a series of boards that are software compatible with
  1388.     the Adaptec 1542, and these come in ISA, VLB, EISA, and PCI flavors.
  1389.  
  1390. Antiquity Problems, fix by upgrading : 
  1391.  
  1392. 1.  Linux kernel revisions prior to .99.10 don't support the 'C' 
  1393.     revision.
  1394.  
  1395. 2.  Linux kernel revisions prior to .99.14k don't support the 'C'
  1396.     revision options for 
  1397.  
  1398.     - BIOS support for the extended mapping for disks > 1G
  1399.  
  1400.     - BIOS support for > 2 drives
  1401.  
  1402.     - BIOS support for autoscanning the SCSI bus
  1403.  
  1404. 3.  Linux kernel revisions prior to .99.15e don't support the 'C'
  1405.     with the BIOS support for > 2 drives turned on and the
  1406.     BIOS support for the extended mapping for disks > 1G turned off.
  1407.  
  1408. 4.  Linux kernel revisions prior to .99.14u don't support the 'CF'
  1409.     revisions of the board.
  1410.  
  1411. 5.  Linux kernel revisions prior to 1.0.5 have a race condition 
  1412.     when multiple devices are accessed at the same time.
  1413.  
  1414. Common problems :
  1415.  
  1416. 1.  There are unexpected errors with a 154xC or 154xCF board,
  1417.  
  1418.     Early examples of the 154xC boards have a high slew rate on 
  1419.     one of the SCSI signals, which results in signal reflections 
  1420.     when cables with the wrong impedance are used.  
  1421.  
  1422.     Newer boards aren't much better, and also suffer from extreme
  1423.     cabling and termination sensitivity.
  1424.  
  1425.     See also Common Problems #2 and #3 and Section 1 : Common Problems,
  1426.     Subsection 1.1 : General Flakiness
  1427.  
  1428. 2.  There are unexpected errors with a 154xC or 154x with
  1429.     both internal and external devices connected.
  1430.  
  1431.     This is probably a termination problem.  In order to 
  1432.     use the software option to disable host adapter termination,
  1433.     you must turn switch 1 off.
  1434.     
  1435.     See also Common Problems #1 and #3 and Section 1 : Common Problems,
  1436.     Subsection 1.1 : General Flakiness
  1437.  
  1438. 3.  The SCSI subsystem locks up completely.
  1439.  
  1440.     There are cases where the lockups seem to occur when multiple devices
  1441.     are in use at the same time.  In this case, you can try contacting
  1442.     the manufacturer of the devices and see if firmware upgrades are
  1443.     available which would correct the problem.  As a last resort, you
  1444.     can go into aha1542.h and change AHA1542_MAILBOX to 1.  This will
  1445.     effectively limit you to one outstanding command on the scsi bus at
  1446.     one time, and may help the situation.  If you have tape drives or
  1447.     slow cdrom drives on the bus, this might not be a practical solution.
  1448.  
  1449.     See also Common Problems #1 and #2 and 
  1450.     Section 1.1 : Common Problems : General Flakiness 
  1451.     Section 1.8 : Common Problems : SCSI Lockups
  1452.  
  1453. 4.  An "Interrupt received, but no mail" message is printed on bootup
  1454.     and your SCSI devices are not detected.
  1455.  
  1456.     Disable the BIOS options to support the extended mapping for 
  1457.     disks > 1G, support for > 2 drives, and for autoscanning the 
  1458.     bus.  Or, upgrade to Linux .99.14k or newer.
  1459.  
  1460. 5.  If infinite timeout errors occur on 'C' revision boards,  you may need 
  1461.         to go into the Adaptec setup program and enable synchronous 
  1462.     negotiation.
  1463.  
  1464. 6.  Linux 1.2.x gives the message
  1465.  
  1466.     Unable to determine Adaptec DMA priority.  Disabling board.
  1467.  
  1468.     This is due to a conflict on some systems with the obsolete BusLogic 
  1469.     driver.  Either rebuild your kernel without it, or give the 
  1470.     BusLogic driver a command line option telling it to look
  1471.     somewhere other than where your controller is configured.  Ie, 
  1472.     if you have an Adaptec board at port 0x334, and nothing at 
  1473.     0x330, use a command line option like
  1474.  
  1475.     buslogic=0x330
  1476.  
  1477. 8.  The system locks up with simultaneous access to multiple devices on 
  1478.     a 1542C or 1540C and disconnection enabled
  1479.  
  1480.     Some Adaptec firmware revisions have bugs.  Upgrading to 
  1481.     BIOS v2.11 purportedly fixes these problems.
  1482.  
  1483. Section 4.5 : Adaptec 174x
  1484. Supported Configurations : 
  1485. Slots : 1-8
  1486. Ports : EISA board, not applicable
  1487. IRQs : 9, 10, 11, 12, 14, 15
  1488. DMA Channels : EISA board, not applicable
  1489. IO : port mapped, bus master
  1490.  
  1491. Autoprobe : works with all supported configurations
  1492.  
  1493. Autoprobe override : none
  1494.  
  1495. Note: This board has been discontinued by Adaptec.
  1496.  
  1497. Common Problems : 
  1498. 1. If the Adaptec 1740 driver prints the message 
  1499.     "aha1740: Board detected, but EBCNTRL = %x, so disabled it."
  1500.  
  1501.     your board was disabled because it was not running in enhanced 
  1502.         mode.  Boards running in standard 1542 mode are not supported.
  1503.  
  1504. Section 4.6 : Adaptec 274x, 284x (Standard) 294x (ALPHA)
  1505.     A newer version which also supports the Adaptec 294x boards 
  1506. is available at 
  1507.  
  1508.     ftp://ftp.ims.com/pub/Linux/aic7xxx
  1509.  
  1510. Supported Configurations 
  1511.         274x            284x        294x
  1512. EISA Slots :     1-12            N/A        N/A
  1513. Ports :     N/A            ALL        ALL
  1514. IRQs :         ALL            ALL        ALL
  1515. DMA Channels :     N/A            ALL        N/A
  1516.  
  1517. IO : port mapped, bus master
  1518.  
  1519. Autoprobe Override :
  1520. kernel command line : aha274x=extended
  1521.     (to force extended mapping)
  1522.  
  1523. Notes:
  1524. 1.  BIOS MUST be enabled
  1525. 2.  The B channel on 2742AT boards is ignored.
  1526. 3.  CONFIG_PCI must be set if you are using a PCI board.
  1527.  
  1528.  
  1529. Section 4.7 : Allways IN2000  (STANDARD)
  1530. Ports : 0x100, 0x110, 0x200, 0x220
  1531. IRQs : 10, 11, 14, 15
  1532. DMA is not used
  1533. IO : port mapped
  1534.  
  1535. Autoprobe : BIOS not required
  1536.  
  1537. Autoprobe override : none
  1538.  
  1539. Common Problems : 
  1540.  
  1541. 1.  There are known problems in systems with IDE drives and with 
  1542.     swapping.
  1543.  
  1544.  
  1545. Section 4.8 : BusLogic MultiMaster Host Adapters
  1546.  
  1547. (this section Copyright 1995 by Leonard N. Zubkoff <lnz@dandelion.com>)
  1548. (see README.BusLogic for more complete BusLogic driver documentation)
  1549.  
  1550.           BusLogic MultiMaster SCSI Driver for Linux
  1551.  
  1552.                Version 1.2.2 for Linux 1.2.13
  1553.                Version 1.3.2 for Linux 1.3.88
  1554.  
  1555.          ftp://ftp.dandelion.com/BusLogic-1.2.2.tar.gz
  1556.          ftp://ftp.dandelion.com/BusLogic-1.3.2.tar.gz
  1557.  
  1558.                  16 April 1996
  1559.  
  1560.                    Leonard N. Zubkoff
  1561.                    Dandelion Digital
  1562.                    lnz@dandelion.com
  1563.  
  1564. BusLogic, Inc. designs and manufactures a variety of high performance SCSI host
  1565. adapters which share a common programming interface across a diverse collection
  1566. of bus architectures by virtue of their MultiMaster ASIC technology.  This
  1567. driver supports all present BusLogic MultiMaster Host Adapters, and should
  1568. support any future MultiMaster designs with little or no modification.  Host
  1569. adapters based on the new FlashPoint architecture are not supported by this
  1570. driver; consult the README.FlashPoint file for information about a program to
  1571. upgrade Linux users from the unsupported FlashPoint LT to the supported BT-948.
  1572.  
  1573. My primary goals in writing this completely new BusLogic driver for Linux are
  1574. to achieve the full performance that BusLogic SCSI Host Adapters and modern
  1575. SCSI peripherals are capable of, and to provide a highly robust driver that can
  1576. be depended upon for high performance mission critical applications.  All of
  1577. the major performance and error recovery features can be configured from the
  1578. Linux kernel command line, allowing individual installations to tune driver
  1579. performance and error recovery to their particular needs.
  1580.  
  1581. BusLogic has been an excellent company to work with and I highly recommend
  1582. their products to the Linux community.  In November 1995, I was offered the
  1583. opportunity to become a beta test site for their latest MultiMaster product,
  1584. the BT-948 PCI Ultra SCSI Host Adapter, and then again for the BT-958 PCI Wide
  1585. Ultra SCSI Host Adapter in January 1996.  This was mutually beneficial since
  1586. BusLogic received a degree and kind of testing that their own testing group
  1587. cannot readily achieve, and the Linux community has available high performance
  1588. host adapters that have been well tested with Linux even before being brought
  1589. to market.  This relationship has also given me the opportunity to interact
  1590. directly with their technical staff, to understand more about the internal
  1591. workings of their products, and in turn to educate them about the needs and
  1592. potential of the Linux community.  Their interest and support is greatly
  1593. appreciated.
  1594.  
  1595. Unlike some other vendors, if you contact BusLogic Technical Support with a
  1596. problem and are running Linux, they will not tell you that your use of their
  1597. products is unsupported.  Their latest product marketing literature even states
  1598. "BusLogic SCSI host adapters are compatible with all major operating systems
  1599. including: ... Linux ...".
  1600.  
  1601. BusLogic, Inc. is located at 4151 Burton Drive, Santa Clara, California, 95054,
  1602. USA and can be reached by Voice at 408/492-9090 or by FAX at 408/492-1542.
  1603. BusLogic maintains a World Wide Web site at http://www.buslogic.com, an
  1604. anonymous FTP site at ftp.buslogic.com, and a BBS at 408/492-1984.  BusLogic
  1605. Technical Support can be reached by electronic mail at techsup@buslogic.com, by
  1606. Voice at 408/654-0760, or by FAX at 408/492-1542.  Contact information for
  1607. offices in Europe and Japan is available on the Web site.
  1608.  
  1609.                 SUPPORTED HOST ADAPTERS
  1610.  
  1611. The following list comprises the supported BusLogic SCSI Host Adapters as of
  1612. the date of this document.  It is recommended that anyone purchasing a BusLogic
  1613. Host Adapter not in the following table contact the author beforehand to verify
  1614. that it is or will be supported.
  1615.  
  1616. "W" Series Host Adapters:
  1617.  
  1618. BT-948        PCI        Ultra Fast Single-ended SCSI-2
  1619. BT-958        PCI        Ultra Wide Single-ended SCSI-2
  1620. BT-958D        PCI        Ultra Wide Differential SCSI-2
  1621.  
  1622. "C" Series Host Adapters:
  1623.  
  1624. BT-946C        PCI        Fast Single-ended SCSI-2
  1625. BT-956C        PCI        Fast Wide Single-ended SCSI-2
  1626. BT-956CD    PCI        Fast Wide Differential SCSI-2
  1627. BT-445C        VLB        Fast Single-ended SCSI-2
  1628. BT-747C        EISA    Fast Single-ended SCSI-2
  1629. BT-757C        EISA    Fast Wide Single-ended SCSI-2
  1630. BT-757CD    EISA    Fast Wide Differential SCSI-2
  1631. BT-545C        ISA        Fast Single-ended SCSI-2
  1632. BT-540CF    ISA        Fast Single-ended SCSI-2
  1633.  
  1634. "S" Series Host Adapters:
  1635.  
  1636. BT-445S        VLB        Fast Single-ended SCSI-2
  1637. BT-747S        EISA    Fast Single-ended SCSI-2
  1638. BT-747D        EISA    Fast Differential SCSI-2
  1639. BT-757S        EISA    Fast Wide Single-ended SCSI-2
  1640. BT-757D        EISA    Fast Wide Differential SCSI-2
  1641. BT-545S        ISA        Fast Single-ended SCSI-2
  1642. BT-542D        ISA        Fast Differential SCSI-2
  1643. BT-742A        EISA    Single-ended SCSI-2 (742A revision H)
  1644. BT-542B        ISA        Single-ended SCSI-2 (542B revision H)
  1645.  
  1646. "A" Series Host Adapters:
  1647.  
  1648. BT-742A        EISA    Single-ended SCSI-2 (742A revisions A - G)
  1649. BT-542B        ISA        Single-ended SCSI-2 (542B revisions A - G)
  1650.  
  1651. AMI FastDisk Host Adapters that are true BusLogic clones are supported by this
  1652. driver.
  1653.  
  1654.               BT-948/958/958D INSTALLATION NOTES
  1655.  
  1656. The BT-948/958/958D PCI Ultra SCSI Host Adapters have some features which may
  1657. require attention in some circumstances when installing Linux.
  1658.  
  1659. o PCI I/O Port Assignments
  1660.  
  1661.   When configured to factory default settings, the BT-948/958/958D will only
  1662.   recognize the PCI I/O port assignments made by the motherboard's PCI BIOS.
  1663.   The BT-948/958/958D will not respond to any of the ISA compatible I/O ports
  1664.   that previous BusLogic SCSI Host Adapters respond to.  This driver supports
  1665.   the PCI I/O port assignments, so this is the preferred configuration.
  1666.   However, if the obsolete BusLogic driver must be used for any reason, such as
  1667.   a Linux distribution that does not yet use this driver in its boot kernel,
  1668.   BusLogic has provided an AutoSCSI configuration option to enable a legacy ISA
  1669.   compatible I/O port.
  1670.  
  1671.   To enable this backward compatibility option, invoke the AutoSCSI utility via
  1672.   Ctrl-B at system startup and select "Adapter Configuration", "View/Modify
  1673.   Configuration", and then change the "ISA Compatible Port" setting from
  1674.   "Disable" to "Primary" or "Alternate".  Once this driver has been installed,
  1675.   the "ISA Compatible Port" option should be set back to "Disable" to avoid
  1676.   possible future I/O port conflicts.  The older BT-946C/956C/956CD also have
  1677.   this configuration option, but the factory default setting is "Primary".
  1678.  
  1679. o PCI Slot Scanning Order
  1680.  
  1681.   In systems with multiple BusLogic PCI Host Adapters, the order in which the
  1682.   PCI slots are scanned may appear reversed with the BT-948/958/958D as
  1683.   compared to the BT-946C/956C/956CD.  For booting from a SCSI disk to work
  1684.   correctly, it is necessary that the host adapter's BIOS and the kernel agree
  1685.   on which disk is the boot device, which requires that they recognize the PCI
  1686.   host adapters in the same order.  The motherboard's PCI BIOS provides a
  1687.   standard way of enumerating the PCI host adapters, which is used by the Linux
  1688.   kernel.  Some PCI BIOS implementations enumerate the PCI slots in order of
  1689.   increasing bus number and device number, while others do so in the opposite
  1690.   direction.
  1691.  
  1692.   Unfortunately, Microsoft decided that Windows 95 would always enumerate the
  1693.   PCI slots in order of increasing bus number and device number regardless of
  1694.   the PCI BIOS enumeration, and requires that their scheme be supported by the
  1695.   host adapter's BIOS to receive Windows 95 certification.  Therefore, the
  1696.   factory default settings of the BT-948/958/958D enumerate the host adapters
  1697.   by increasing bus number and device number.  To disable this feature, invoke
  1698.   the AutoSCSI utility via Ctrl-B at system startup and select "Adapter
  1699.   Configuration", "View/Modify Configuration", press Ctrl-F10, and then change
  1700.   the "Use Bus And Device # For PCI Scanning Seq." option to OFF.
  1701.  
  1702.   This driver will interrogate the setting of the PCI Scanning Sequence option
  1703.   so as to recognize the host adapters in the same order as they are enumerated
  1704.   by the host adapter's BIOS.
  1705.  
  1706.               BUSLOGIC ANNOUNCEMENTS MAILING LIST
  1707.  
  1708. The BusLogic Announcements Mailing List provides a forum for informing Linux
  1709. users of new driver releases and other announcements regarding Linux support
  1710. for BusLogic SCSI Host Adapters.  To join the mailing list, send a message to
  1711. "BusLogic-announce-request@dandelion.com" with the line "subscribe" in the
  1712. message body.
  1713.  
  1714.  
  1715. Section 4.9 : BusLogic FlashPoint Host Adapters
  1716. (this section Copyright 1995 by Leonard N. Zubkoff <lnz@dandelion.com>)
  1717.  
  1718. There are no Linux drivers for the FlashPoint LT/DL/LW (BT-930/932/950)
  1719. available and it is not clear when or if there will be any.  The FlashPoint
  1720. boards have a different architecture from the MultiMaster boards and have no
  1721. onboard CPU, only a SCSI sequencer engine.  They are positioned as a desktop
  1722. workstation product, and are not particularly well suited for a high
  1723. performance multitasking operating system like Linux.
  1724.  
  1725. The MultiMaster BT-948/958 have an onboard CPU and the mailbox programming
  1726. interface allows for parallelism and pipelining between the host operating
  1727. system and the host adapter, whereas the FlashPoint boards require frequent
  1728. host CPU intervention.  As interrupt latencies rise in a loaded multitasking
  1729. system, the BT-948/958 should maintain excellent performance whereas the
  1730. FlashPoint's performance will likely drop quite rapidly.  Furthermore, the
  1731. firmware on the BT-948/958 contains the low level knowledge for proper
  1732. interaction with the SCSI bus, whereas with a sequencer engine the Linux driver
  1733. must contain some or all of this information, and it often takes quite a long
  1734. time to get all the kinks worked out.  Given the relatively small difference in
  1735. the street price of these products, the BT-948 or BT-958 is clearly the better
  1736. choice for Linux.
  1737.  
  1738. <begin quotation>
  1739.  
  1740.                  ANNOUNCEMENT
  1741.           BusLogic FlashPoint/BT-948 Upgrade Program
  1742.                 1 February 1996
  1743.  
  1744. Ever since its introduction last October, the BusLogic FlashPoint LT has
  1745. been problematic for members of the Linux community, in that no Linux
  1746. drivers have been available for this new Ultra SCSI product.  Despite it's
  1747. officially being positioned as a desktop workstation product, and not being
  1748. particularly well suited for a high performance multitasking operating
  1749. system like Linux, the FlashPoint LT has been touted by computer system
  1750. vendors as the latest thing, and has been sold even on many of their high
  1751. end systems, to the exclusion of the older MultiMaster products.  This has
  1752. caused grief for many people who inadvertently purchased a system expecting
  1753. that all BusLogic SCSI Host Adapters were supported by Linux, only to
  1754. discover that the FlashPoint was not supported and would not be for quite
  1755. some time, if ever.
  1756.  
  1757. After this problem was identified, BusLogic contacted its major OEM
  1758. customers to make sure the BT-946C/956C MultiMaster cards would still be
  1759. made available, and that Linux users who mistakenly ordered systems with
  1760. the FlashPoint would be able to upgrade to the BT-946C.  While this helped
  1761. many purchasers of new systems, it was only a partial solution to the
  1762. overall problem of FlashPoint support for Linux users.  It did nothing to
  1763. assist the people who initially purchased a FlashPoint for a supported
  1764. operating system and then later decided to run Linux, or those who had
  1765. ended up with a FlashPoint LT, believing it was supported, and were unable
  1766. to return it.
  1767.  
  1768. In the middle of December, I asked to meet with BusLogic's senior
  1769. management to discuss the issues related to Linux and free software support
  1770. for the FlashPoint.  Rumors of varying accuracy had been circulating
  1771. publicly about BusLogic's attitude toward the Linux community, and I felt
  1772. it was best that these issues be addressed directly.  I sent an email
  1773. message after 11pm one evening, and the meeting took place the next
  1774. afternoon.  Unfortunately, corporate wheels sometimes grind slowly,
  1775. especially when a company is being acquired, and so it's taken until now
  1776. before the details were completely determined and a public statement could
  1777. be made.
  1778.  
  1779. BusLogic is not prepared at this time to release the information necessary
  1780. for third parties to write drivers for the FlashPoint.  The only existing
  1781. FlashPoint drivers have been written directly by BusLogic Engineering, and
  1782. there is no FlashPoint documentation sufficiently detailed to allow outside
  1783. developers to write a driver without substantial assistance.  While there
  1784. are people at BusLogic who would rather not release the details of the
  1785. FlashPoint architecture at all, that debate has not yet been settled either
  1786. way.  In any event, even if documentation were available today it would
  1787. take quite a while for a usable driver to be written, especially since I'm
  1788. not convinced that the effort required would be worthwhile.
  1789.  
  1790. However, BusLogic does remain committed to providing a high performance
  1791. SCSI solution for the Linux community, and does not want to see anyone left
  1792. unable to run Linux because they have a Flashpoint LT.  Therefore, BusLogic
  1793. has put in place a direct upgrade program to allow any Linux user worldwide
  1794. to trade in their FlashPoint LT for the new BT-948 MultiMaster PCI Ultra
  1795. SCSI Host Adapter.  The BT-948 is the Ultra SCSI successor to the BT-946C
  1796. and has all the best features of both the BT-946C and FlashPoint LT,
  1797. including smart termination and a flash PROM for easy firmware updates, and
  1798. is of course compatible with the present Linux driver.  The price for this
  1799. upgrade has been set at US $45, and the upgrade program will be
  1800. administered through BusLogic Technical Support, which can be reached by
  1801. electronic mail at techsup@BusLogic.com, by Voice at +1 408 654-0760, or by
  1802. FAX at +1 408 492-1542.
  1803.  
  1804. I was a beta test site for the BT-948 and versions 1.2.1 and 1.3.1 of my
  1805. BusLogic driver already include latent support for the BT-948.  Additional
  1806. cosmetic support for the Ultra SCSI MultiMaster cards will be added in a
  1807. subsequent release.  As a result of this cooperative testing process,
  1808. several firmware bugs were found and corrected (make sure you have firmware
  1809. version 5.05R or later).  My heavily loaded Linux test system provided an
  1810. ideal environment for testing error recovery processes that are much more
  1811. rarely exercised in production systems, but are crucial to overall system
  1812. stability.  It was especially convenient being able to work directly with
  1813. their firmware engineer in demonstrating the problems under control of the
  1814. firmware debugging environment; things sure have come a long way since the
  1815. last time I worked on firmware for an embedded system.  I am presently
  1816. working on some performance testing and expect to have some data to report
  1817. in the not too distant future.
  1818.  
  1819. BusLogic asked me to send this announcement since a large percentage of the
  1820. questions regarding support for the FlashPoint have either been sent to me
  1821. directly via email, or have appeared in the Linux newsgroups in which I
  1822. participate.  To summarize, BusLogic is offering Linux users an upgrade
  1823. from the unsupported FlashPoint LT (BT-930) to the supported BT-948 for US
  1824. $45.  Contact BusLogic Technical Support at techsup@BusLogic.com or +1 408
  1825. 654-0760 to take advantage of their offer.
  1826.  
  1827.         Leonard N. Zubkoff
  1828.         lnz@dandelion.com
  1829.  
  1830. <end quotation>
  1831.  
  1832.  
  1833. Section 4.10 : EATA: DPT SmartCache, SmartCache Plus, SmartCache III, 
  1834.                      SmartCache IV and SmartRAID (Standard)
  1835. Supported boards: all, that support the EATA-DMA protocol.
  1836.  
  1837. Among them are:
  1838.  
  1839. DPT Smartcache (Plus) family:
  1840. PM2011      ISA        Fast Single-ended SCSI-2
  1841. PM2012B     EISA    Fast Single-ended SCSI-2
  1842.  
  1843. DPT Smartcache III family:
  1844. PM2021         ISA     Fast Single-ended SCSI-2
  1845. PM2021W     ISA     Wide Single-ended SCSI-2
  1846. PM2022      EISA    Fast Single-ended SCSI-2
  1847. PM2022W     EISA    Wide Single-ended SCSI-2
  1848. PM2024      PCI     Fast Single-ended SCSI-2
  1849. PM2024W     PCI     Wide Single-ended SCSI-2
  1850. PM2122      EISA    Fast Single-ended SCSI-2
  1851. PM2122W     EISA    Wide Single-ended SCSI-2
  1852. PM2124      PCI     Fast Single-ended SCSI-2
  1853. PM2124W     PCI     Wide Single-ended SCSI-2
  1854. PM2322      EISA    Fast Single-ended SCSI-2
  1855. PM2322W     EISA    Wide Single-ended SCSI-2
  1856.  
  1857. DPT Smartcache VI family:
  1858. PM2041W     ISA     Wide Single-ended SCSI-2
  1859. PM2041UW    ISA     Ultra Wide Single-ended SCSI-2
  1860. PM2042W     EISA    Wide Single-ended SCSI-2 
  1861. PM2042UW    EISA    Ultra Wide Single-ended SCSI-2 
  1862. PM2044W     PCI     Wide Single-ended SCSI-2
  1863. PM2044UW    PCI     Ultra Wide Single-ended SCSI-2
  1864. PM2142W     EISA    Wide Single-ended SCSI-2
  1865. PM2142UW    EISA    Ultra Wide Single-ended SCSI-2
  1866. PM2144W     PCI     Wide Single-ended SCSI-2
  1867. PM2144UW    PCI     Ultra Wide Single-ended SCSI-2
  1868. PM2322W     EISA    Wide Single-ended SCSI-2
  1869. PM2322UW    EISA    Ultra Wide Single-ended SCSI-2
  1870.  
  1871. DPT SmartRAID family:
  1872. PM3021         ISA     Fast Single-ended SCSI-2
  1873. PM3021W        ISA     Wide Single-ended SCSI-2
  1874. PM3122      EISA    Fast Single-ended SCSI-2
  1875. PM3122W     EISA    Wide Single-ended SCSI-2
  1876. PM3222      EISA    Fast Single-ended SCSI-2
  1877. PM3222W     EISA    Wide Single-ended SCSI-2
  1878. PM3224      PCI     Fast Single-ended SCSI-2
  1879. PM3224W     PCI     Wide Single-ended SCSI-2
  1880. PM3334W     PCI     Wide Single-ended SCSI-2
  1881. PM3334UW    PCI     Ultra Wide Single-ended SCSI-2
  1882.  
  1883. also the differential versions of the above controllers.
  1884.   
  1885. and some controllers from:
  1886.  NEC, AT&T, SNI, AST, Olivetti, Alphatronix.
  1887.  
  1888. Supported Configurations :
  1889. Slots        : ALL
  1890. Ports        : ALL
  1891. IRQs         : ALL level & edge triggered
  1892. DMA Channels : ISA ALL, EISA/PCI not applicable
  1893. IO           : port mapped, bus master
  1894. SCSI Channels: ALL
  1895. Autoprobe    : works with all supported configurations
  1896.  
  1897. The latest version of the EATA-DMA driver is available on:
  1898.   ftp.i-Connect.Net:/pub/Local/EATA/
  1899.  
  1900. Mailinglist:
  1901. The EATA Mailing List provides a forum to Linux users of the EATA-DMA and 
  1902. EATA-PIO driver for discussions and announcements of new releases and other 
  1903. announcements.  
  1904. To join the mailing list, send a message to "linux-eata-request@i-connect.net"
  1905. with the line "subscribe" in the message body.
  1906.  
  1907. /proc/scsi support:
  1908. To get advanced command statistics, do the following:
  1909. echo "eata_dma latency" >/proc/scsi/eata_dma/<driver_no>
  1910. and to switch it off again:
  1911. echo "eata_dma nolatency" >/proc/scsi/eata_dma/<driver_no>
  1912.  
  1913. Common Problems : 
  1914. 1.  Slackware doesn't find the controller.
  1915.     Solution: Use one of the ascsi* bootdisks.
  1916.  
  1917. 2.  The IDE driver can detect the ST-506 interface of the EATA board in old 
  1918.     kernels (<v1.3). 
  1919. 2.1     This will look like similar to one of the following 2 examples:
  1920.  
  1921.     hd.c: ST-506 interface disk with more than 16 heads detected,
  1922.       probably due to non-standard sector translation.  Giving up.
  1923.       (disk %d: cyl=%d, sect=63, head=64)
  1924.  
  1925.         hdc: probing with STATUS instead of ALTSTATUS
  1926.         hdc: MP0242 A, 0MB w/128KB Cache, CHS=0/0/0
  1927.      hdc: cannot handle disk with 0 physical heads
  1928.      hdd: probing with STATUS instead of ALTSTATUS
  1929.      hdd: MP0242 A, 0MB w/128KB Cache, CHS=0/0/0
  1930.      hdd: cannot handle disk with 0 physical heads
  1931.  
  1932.         If the IDE driver gets into trouble because of this, ie. you can't
  1933.     access your (real) IDE hardware, change the IO Port and/or the IRQ of 
  1934.     the EATA board.
  1935. 2.2     If the IDE driver finds hardware it can handle ie. harddisks with
  1936.         a capacity <=504MB, it will allocate the IO Port and IRQ, so that
  1937.         the eata driver can't utilize them. In this case also change IO Port
  1938.         and IRQ (!= 14,15).
  1939.  
  1940. 3. Some old SK2011 boards have a broken firmware. Please contact DPT's 
  1941.         customer support for an update.
  1942.  
  1943. Notes:
  1944. 1.  CONFIG_PCI must be set if you are using a PCI board.
  1945.  
  1946. Section 4.12 : Future Domain 16x0 with TMC-1800, TMC-18C30, TMC-18C50,
  1947.     or TMC-36C70 chip 
  1948. Supported Configurations :
  1949. BIOSs :  2.0, 3.0, 3.2, 3.4, 3.5
  1950. BIOS Addresses :    0xc8000, 0xca000, 0xce000, 0xde000
  1951. Ports : 0x140, 0x150, 0x160, 0x170
  1952. IRQs : 3, 5, 10, 11, 12, 14, 15
  1953. DMA is not used
  1954. IO : port mapped
  1955.  
  1956. Autoprobe : works with all supported configurations, requires 
  1957.     installed BIOS
  1958.  
  1959. Autoprobe Override : none
  1960.  
  1961. Antiquity Problems, fix by upgrading : 
  1962.  
  1963. 1.  Old versions do not support the TMC-18C50 chip, and will fail with
  1964.     newer boards. 
  1965.  
  1966. 2.  Old versions will not have the most current BIOS signatures for 
  1967.     autodetection.
  1968.  
  1969. 3.  Versions prior to the one included in Linux 1.0.9 and 1.1.6 
  1970.     don't support the new SCSI chip or 3.4 BIOS.
  1971.  
  1972. Notes : 
  1973.     The Future Domain BIOS often scans for SCSI-devices from highest
  1974.     ID to 0, in reverse order of other SCSI BIOSes.  sda will be the last 
  1975.     "drive letter" (ie, D: rather than C:).  You may also need to use a 
  1976.     a disktab override for LILO.
  1977.  
  1978. Section 4.12 : Generic NCR5380 / T130B
  1979. Supported and Unsupported Configurations : 
  1980. Ports : all
  1981. IRQs : all
  1982. DMA channels - DMA is not used
  1983. IO : port mapped
  1984.  
  1985. Autoprobe : none
  1986.  
  1987. Autoprobe Override :
  1988. Compile time : Define GENERIC_NCR5380_OVERRIDE to be an array of tupples 
  1989. with port, irq, dma, board type - ie 
  1990. #define GENERIC_NCR5380_OVERRIDE {{0x330, 5, DMA_NONE, BOARD_NCR5380}} 
  1991.  
  1992. for a NCR5380 board at port 330, IRQ 5.
  1993.  
  1994. #define GENERIC_NCR5380_OVERRIDE {{0x350, 5, DMA_NONE, BOARD_NCR53C400}}
  1995.  
  1996. for a T130B at port 0x350.
  1997.  
  1998. Older versions of the code eliminate the BOARD_* entry.
  1999.  
  2000. The symbolic IRQs IRQ_NONE and IRQ_AUTO may be used.
  2001.     
  2002. kernel command line : ncr5380=port,irq
  2003.               ncr5380=port,irq,dma
  2004.               ncr53c400=port,irq
  2005.          
  2006. 255 may be used for no irq, 254 for irq autoprobe.
  2007.  
  2008. Common Problems : 
  2009.  
  2010. 1. Using the T130B board with the old (pre public release 6) generic 
  2011.     NCR5380 driver which doesn't support the ncr53c400 command
  2012.     line option.
  2013.  
  2014.     The NCR5380 compatable registers are offset eight from
  2015.     the base address.  So, if your address is 0x350, use 
  2016.  
  2017.     ncr5380=0x358,254
  2018.  
  2019.     on the kernel command line.  
  2020.  
  2021. Antiquity problems, fix by upgrading :
  2022. 1.  The kernel locks up during disk access with T130B or other 
  2023.     NCR53c400 boards
  2024.  
  2025.     Pre-public release 6 versions of the Generic NCR5380
  2026.     driver didn't support interrupts on these boards.  
  2027.     Upgrade.
  2028.  
  2029.  
  2030. Notes : the generic driver doesn't support DMA yet, and pseudo-DMA 
  2031.     isn't supported in the generic driver.
  2032.  
  2033. Section 4.14 : NCR53c8xx (Standard)
  2034.     
  2035. Supported and Unsupported Configurations :
  2036. Base addresses : ALL
  2037. IRQs : ALL
  2038. DMA channels : PCI, not applicable
  2039. IO : port mapped, busmastering
  2040.  
  2041. Autoprobe : requires PCI BIOS, uses PCI BIOS routines to
  2042.     search for devices and read configuration space
  2043.  
  2044. The driver uses the pre-programmed values in some registers for 
  2045. initialization, so a BIOS must be installed.
  2046.  
  2047. Antiquity Problems, fix by upgrading :
  2048.  
  2049. 1.  Older versions of Linux had a problem with swapping
  2050.     See Section 5.2.7 : Disks :  System Hangs When Swapping
  2051.  
  2052. 2.  Older versions of Linux didn't recognize '815 and '825
  2053.     boards.
  2054.  
  2055. 3.  Distribution kernels include release 4 or 5 of the driver, which does 
  2056.     not support useful things like disconnect/reconnect (the most noticeable
  2057.     effect of this being attempts to retension/rewind/file space a tape 
  2058.     lock you out of all SCSI devices), multiple host adapters, and 
  2059.     BIOSless operation.
  2060.  
  2061.     The latest release of the driver is available at
  2062.  
  2063.     ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/ncr53c810
  2064.  
  2065.     Currently, this is a 1.2.10 and newer patch, although the next 
  2066.     release will be 1.3.x exclusively.  These patches are NOT
  2067.     entirely clean due to some ELF and other patches which were
  2068.     in the baseline revision of my source tree, and if you 
  2069.     can't manually correct the (four) problems you should get,
  2070.     you shouldn't use them.  Note that only the newest patch is
  2071.     needed; these are not incremental.
  2072.  
  2073.     If you wish to run the newer NCR driver with a 1.3.x kernel
  2074.     before then, Harald Evensen <Harald.Evensen@pvv.unit.no> has 
  2075.     adapted the patches for 1.3.x
  2076.  
  2077.     ftp://ftp.pvv.unit.no/pub/Linux/ALPHA/ncr
  2078.  
  2079.     These patches should be clean.
  2080.  
  2081.     Please see all of the READMEs in these directories.  You should 
  2082.     also join the NCR mailing list if you are interested in running 
  2083.     the ALPHA code, since interim bug fixes and announcements of the 
  2084.     next release are posted to this list.
  2085.  
  2086.     To subscribe, send mail to majordomo@colorado.edu with 
  2087.  
  2088.     subscribe ncr53c810
  2089.     
  2090.     in the text.  You can unsubscribe by sending mail to the same address
  2091.     and including
  2092.     
  2093.     unsubscribe ncr53c810
  2094.  
  2095.     in the text.
  2096.  
  2097. Common Problems : 
  2098.  
  2099. 1.  Many people have encountered problems where the chip worked
  2100.     fine under DOS, but failed under Linux with a timeout on
  2101.     test 1 due to a lost interrupt.
  2102.  
  2103.     This is often due to a mismatch between the IRQ hardware
  2104.     jumper for a slot or mainboard device and the value set
  2105.     in the CMOS setup.  DOUBLE CHECK 
  2106.         - The IRQ you are using is used only by your onboard NCR chip, 
  2107.           or the slot an NCR board is installed in
  2108.         - Any main board jumpers selecting the IRQ for the onboard
  2109.           chip or slot match your CMOS setup.a
  2110.         - Some PCI mainboards have an "auto" assignment 
  2111.           feature, which will not work.
  2112.  
  2113.     It may also be due to PCI INTB, INTC, or INTD being selected
  2114.     on a PCI board in a system which only supports PCI INTA.  If you
  2115.     are using an NCR board which has jumpers to select between PCI 
  2116.     interrupt lines, make sure you are using INTA.
  2117.  
  2118.     Finally, PCI should be using level-sensitive rather
  2119.     than edge triggered interrupts.  Check that your board
  2120.     is jumpered for level-sensitive, and if that fails
  2121.     try edge-triggered because your system may be 
  2122.     broken.
  2123.  
  2124.     This problem is especially common with Viglen some Viglen
  2125.     motherboards, where the mainboard IRQ jumper settings are
  2126.     NOT as documented in the manual.  I've been told that what
  2127.     claims to be IRQ5 is really IRQ9, your mileage will vary.
  2128.  
  2129. 2.  Lockups / other problems occur when using an S3 928, or Tseng 
  2130.         ET4000W32 PCI video board.
  2131.  
  2132.     There are hardware bugs in at least some revisions of these
  2133.     chips.  Don't use them.
  2134.  
  2135. 3.  You get a message on boot up indicating that the I/O mapping 
  2136.     was disabled because base address 0 bits 0..1 indicated a 
  2137.     non I/O mapping
  2138.  
  2139.     This is due to a BIOS bug in some machines which results in
  2140.     dword reads of configuration regsisters returning the 
  2141.     high and low 16 bit words swapped.
  2142.  
  2143. 4.  Some systems have problems if PCI write posting, or CPU->
  2144.     PCI buffering are enabled.  If you have problems,
  2145.     disable these options.
  2146.  
  2147. 5.  Some systems with the NCR SDMS software in an onboard BIOS
  2148.  
  2149.         ROM and in the system BIOS are unable to boot DOS. 
  2150.     Disabling the image in one place should rectify this 
  2151.     problem.
  2152.  
  2153. 6.  If you encounter the message 
  2154.  
  2155.     "scsi%d: IRQ0 not free, detaching"
  2156.  
  2157.     or
  2158.  
  2159.     "scsi%d: IRQ255 not free, detaching"
  2160.  
  2161.     The NCR chip had all 0 or 1 bits stored in the PCI configuration 
  2162.     register.  Either you have configuration problems (see Common 
  2163.     Problem 1), or you have a defective mainboard BIOS.
  2164.  
  2165.     As a work arround, you could edit drivers/scsi/ncr53c7,8xx.c,
  2166.     and change pci_init() so that you have 
  2167.  
  2168.         irq = my_irq;
  2169.  
  2170.     before 
  2171.             return normal_init (tpnt, board, chip, (int) base, 
  2172.             (int) io_port, (int) irq, DMA_NONE, 1, bus, device_fn, 
  2173.             options);
  2174.  
  2175. 7.  Some systems have hideous, broken, BIOS chips.  Don't 
  2176.     make any bug reports until you've made sure you have
  2177.     the newest ROM from your vendor.
  2178.  
  2179. 8.  The command line overrides ncr53c810=xxx, etc. don't work.   
  2180.  
  2181.     In stock kernels, this is because their entry points are not included 
  2182.     in init/main.c, which is quite intentional : 
  2183.  
  2184.         The driver makes no attempt to avoid autoprobing for a board
  2185.         where a command line override was used, so if an override
  2186.         is used where the board actually showed up to the PCI
  2187.         configuration routines, you'll have big problems.
  2188.  
  2189.         The only reason you would need an  override would be if the 
  2190.         PCI hardware + BIOS were broken, in which case certain error 
  2191.         recovery routines wouldn't work, rendering the override
  2192.         less than useful.
  2193.  
  2194.         Finally, nearly all of people who _think_ they need a command line
  2195.         override do because they get configuration or other error messages
  2196.         from the driver.  If the driver says you have a configuration
  2197.         problem, you have a broken system or a configuration problem
  2198.         and no override is going to fix this.
  2199.  
  2200.     If some one has gone and added the appropriate entry points to
  2201.     init/main.c for command line overrides, they are totally unsupported 
  2202.     and may not work.
  2203.  
  2204. 9.  Certain NCR boards (most notably Nexstor) which don't use an 
  2205.     NCR BIOS get timeouts.  Some of these ROMs handle synchronous
  2206.     and transfers, negotiate for sync. transfers on power up,
  2207.     and leave the drives in an unknown state.  When the distribution 
  2208.     Linux NCR driver attempts to talk with them, it gets timeouts
  2209.     and cannot recover because it won't do a bus reset or renegotiate.
  2210.  
  2211.     If you run into this problem, you can either disable 
  2212.     synchronous transfers in the board's setup program, or
  2213.     upgrade to a newer ALPHA release of the NCR driver which
  2214.     will do synchronous negotiation.
  2215.  
  2216. 10.  Tyan S1365 '825 boards have problems with timeouts, especially
  2217.     when disconnects are enabled.  Some of these boards have the 
  2218.     documentation regarding the termination enable jumper reversed - 
  2219.     so that termination is off when you need it, and on when it 
  2220.     shouldn't be.
  2221.  
  2222.     Try reversing the position of the jumper.
  2223.  
  2224. Notes:
  2225. 1.  CONFIG_PCI must be set
  2226.  
  2227. Section 4.15 : Seagate ST0x/Future Domain TMC-8xx/TMC-9xx 
  2228. Supported and Unsupported Configurations : 
  2229. Base addresses : 0xc8000, 0xca000, 0xcc000, 0xce000, 0xdc000, 0xde000 
  2230. IRQs : 3, 5
  2231. DMA channels : DMA is not used
  2232. IO : memory mapped
  2233.  
  2234. Autoprobe : probes for address only, IRQ is assumed to be 5,
  2235.     requires installed BIOS.
  2236.  
  2237. Autoprobe Override :
  2238. Compile time : Define OVERRIDE to be the base address, CONTROLLER to 
  2239. FD or SEAGATE as appropriate, and IRQ to the IRQ.
  2240.  
  2241. kernel command line : st0x=address,irq or tmc8xx=address,irq (only works 
  2242.     for .99.13b and newer)
  2243.  
  2244. Antiquity Problems, fix by upgrading :
  2245.  
  2246. 1.  Versions prior to the one in the Linux .99.12 kernel had a problem
  2247.     handshaking with some slow devices, where
  2248.  
  2249.     This is what happens when you write data out to the bus
  2250.  
  2251.     1.  Write byte to data register, data register is asserted to bus
  2252.     2.  time_remaining = 12us
  2253.     3.  wait while time_remaining > 0 and REQ is not asserted
  2254.     4.  if time_remaining > 0, assert ACK
  2255.     5.  wait while time remaining > 0  and REQ is asserted
  2256.     6.  deassert ACK
  2257.  
  2258.     The problem was encountered in slow devices that do the command
  2259.     processing as they read the command, where the REQ/ACK handshake
  2260.     takes over 12us - REQ didn't go false when the driver expected it
  2261.     to, so the driver ended up sending multiple bytes of data for
  2262.     each REQ pulse.
  2263.  
  2264. 2.  With Linux .99.12, a bug was introduced when I fixed the arbitration
  2265.     code, resulting in failed selections on some systems.  This was
  2266.     fixed in .99.13.
  2267.  
  2268. Common Problems : 
  2269.  
  2270. 1.  There are command timeouts when Linux attempts to read the partition
  2271.     table or do other disk access.
  2272.  
  2273.     The board ships with the defaults set up for MSDOS, ie interrupts
  2274.     are disabled.  To jumper the board for interrupts, on the Seagate
  2275.     use jumper W3 (ST01) or JP3 (ST02) and short pins F-G to select 
  2276.     IRQ 5.
  2277.  
  2278. 2.  The driver can't handle some devices, particularly cheap SCSI 
  2279.     tapes and CDROMs.
  2280.  
  2281.     The Seagate ties the SCSI bus REQ/ACK handshaking into the PC bus
  2282.     IO CHANNEL READY and (optionally) 0WS signals.  Unfortunately, it 
  2283.     doesn't tell you when the watchdog timer runs out, and you have 
  2284.     no way of knowing for certain that REQ went low, and may end up
  2285.     seeing one REQ pulse as multiple REQ pulses.
  2286.  
  2287.     Dealing with this means using a tight loop to look for REQ to 
  2288.     go low, with a timeout incase you don't catch the transition due
  2289.     to an interrupt, etc.  This results in a performance decrease, so it
  2290.     would be undesireable to apply this to all SCSI devices.  Instead, 
  2291.     it is selected on a per-device basis with the "borken" field for 
  2292.     the given SCSI device in the scsi_devices array.  If you run into
  2293.     problems, you should try adding your device to the list of 
  2294.     devices for which borken is not reset to zero (currently, 
  2295.     only the TENEX CDROM drives).
  2296.  
  2297. 3.  A future domain board (specific examples include the 840,841,
  2298.     880, and 881) doesn't work.
  2299.     
  2300.     A few of the Future domain boards use the Seagate 
  2301.     register mapping, and have the MSG and CD bits of the 
  2302.     status register flipped.
  2303.  
  2304.     You should edit seagate.h, swapping the definitions for 
  2305.     STAT_MSG and STAT_CD, and recompile the kernel with 
  2306.     CONTROLLER defined to SEAGATE and an appropriate 
  2307.     IRQ and OVERRIDE specified.
  2308.  
  2309. 4.  When attempting to fdisk your drive, you get error messages
  2310.     indicating that the HDIO_REQ or HDIO_GETGEO ioctl failed,
  2311.     or 
  2312.  
  2313.     You must set heads sectors and cylinders.
  2314.     You can do this from the extra functions menu.
  2315.  
  2316.  
  2317.     See Section 5.4 : Disks : Partitioning
  2318.  
  2319. 5.  After manually specifying the drive geometry, subsequent
  2320.     attempts to read the partition table result in partition
  2321.     boundary not on a cylinder boundary, physical and logical
  2322.     boundaries don't match, etc. error messages.
  2323.  
  2324.     See Section 5.4 : Disks : Partitioning
  2325.  
  2326.  
  2327. 6.  Some systems which worked prior to .99.13 fail with newer 
  2328.     versions of Linux.  Older versions of Linux assigned the 
  2329.     CONTROL and DATA registers in an order different than that 
  2330.     outlined in the Seagate documentation, which broke on some 
  2331.     systems.  Newer versions make the assignment in the correct 
  2332.     way, but this breaks other systems.
  2333.  
  2334.     The code in seagate.c looks like this now : 
  2335.  
  2336.     cli();
  2337.     DATA = (unsigned char) ((1 << target) | (controller_type == SEAGATE ? 0x80 : 0x40));
  2338.     CONTROL = BASE_CMD | CMD_DRVR_ENABLE | CMD_SEL | 
  2339.         (reselect ? CMD_ATTN : 0);
  2340.     sti();
  2341.  
  2342.     Changing this to 
  2343.  
  2344.     cli();
  2345.     CONTROL = BASE_CMD | CMD_DRVR_ENABLE | CMD_SEL | 
  2346.         (reselect ? CMD_ATTN : 0);
  2347.     DATA = (unsigned char) ((1 << target) | (controller_type == SEAGATE ? 0x80 : 0x40));
  2348.     sti()
  2349.  
  2350.     may fix your problem.
  2351.  
  2352. Defines : 
  2353.  
  2354. FAST or FAST32 will use blind transfers where possible
  2355.  
  2356. ARBITRATE will cause the host adapter to arbitrate for the 
  2357.     bus for better SCSI-II compatability, rather than just 
  2358.         waiting for BUS FREE and then doing its thing.  Should
  2359.     let us do one command per Lun when I integrate my 
  2360.     reorganization changes into the distribution sources.
  2361.  
  2362. SLOW_HANDSHAKE will allow compatability with broken devices that don't 
  2363.     handshake fast enough (ie, some CD ROM's) for the Seagate
  2364.     code.
  2365.  
  2366. SLOW_RATE=x, x some number will let you specify a default 
  2367.     transfer rate if handshaking isn't working correctly.
  2368.  
  2369. Section 4.16 : PAS16 SCSI
  2370. Supported and Unsupported Configurations : 
  2371. Ports : 0x388, 0x384, 0x38x, 0x288
  2372. IRQs : 10, 12, 14, 15
  2373.     IMPORTANT : IRQ MUST be different from the IRQ used for the sound
  2374.     portion of the board. 
  2375. DMA is not used for the SCSI portion of the board
  2376. IO : port mapped
  2377.  
  2378. Autoprobe : does not require BIOS
  2379.  
  2380. Autoprobe Override : 
  2381. Compile time : Define PAS16_OVERRIDE to be an array of port, irq 
  2382. tupples.  Ie 
  2383.  
  2384. #define PAS16_OVERRIDE {{0x388, 10}} 
  2385.  
  2386. for a board at port 0x388, IRQ 10.
  2387.  
  2388. kernel command line : 
  2389. pas16=port,irq 
  2390.  
  2391. Defines :
  2392. AUTOSENSE - if defined, REQUEST SENSE will be performed automatically
  2393. for commands that return with a CHECK CONDITION status. 
  2394.  
  2395. PSEUDO_DMA - enables PSEUDO-DMA hardware, should give a 3-4X performance
  2396. increase compared to polled I/O.
  2397.  
  2398. PARITY - enable parity checking.  Not supported
  2399.  
  2400. SCSI2 - enable support for SCSI-II tagged queueing.  Untested
  2401.  
  2402.  
  2403. UNSAFE - leave interrupts enabled during pseudo-DMA transfers.  You
  2404.          only really want to use this if you're having a problem with
  2405.          dropped characters during high speed communications, and even
  2406.          then, you're going to be better off twiddling with transfersize.
  2407.  
  2408. USLEEP - enable support for devices that don't disconnect.  Untested.
  2409.  
  2410.  
  2411. Common problems : 
  2412.  
  2413. 1.  Command timeouts, aborts, etc.
  2414.  
  2415.     You should install the NCR5380 patches that I posted to the net 
  2416.     some time ago, which should be integrated into some future alpha
  2417.     release.  These patches fix a race condition in earlier NCR5380
  2418.     driver cores, as well as fixing support for multiple devices on 
  2419.     NCR5380 based boards.
  2420.  
  2421.     If that fails, you should disable the PSEUDO_DMA option by 
  2422.     changing the #define PSEUDO_DMA line in drivers/scsi/pas16.c to #undef
  2423.     PSEUDO_DMA.
  2424.  
  2425.     Note that the later should be considered a last resort, because
  2426.     there will be a severe performance degradation.
  2427.  
  2428.  
  2429.  
  2430. Section 4.17 : Trantor T128/T128F/T228 
  2431. Supported and Unsupported Configurations : 
  2432. Base addresses :  0xcc000, 00xc8000, 0xdc000, 0xd8000
  2433. IRQs : none, 3, 5, 7 (all boards)
  2434.     10, 12, 14, 15 (T128F only)
  2435. DMA is not used.
  2436. IO : memory mapped
  2437.  
  2438. Autoprobe : works for all supported configurations, requires 
  2439.     installed BIOS.
  2440.  
  2441. Autoprobe Override :
  2442. Compile time : Define T128_OVERRIDE to be an array of address, irq 
  2443. tupples.  Ie 
  2444.  
  2445. #define T128_OVERRIDE {{0xcc000, 5}} 
  2446.  
  2447. for a board at address 0xcc000, IRQ 5.
  2448.  
  2449. The symbolic IRQs IRQ_NONE and IRQ_AUTO may be used.
  2450.  
  2451. kernel command line : t128=address,irq
  2452.  
  2453. -1 may be used for no irq, -2 for irq autoprobe.
  2454.  
  2455. Defines : 
  2456. AUTOSENSE - if defined, REQUEST SENSE will be performed automatically
  2457. for commands that return with a CHECK CONDITION status. 
  2458.  
  2459. PSEUDO_DMA - enables PSEUDO-DMA hardware, should give a 3-4X performance
  2460. increase compared to polled I/O.
  2461.  
  2462. PARITY - enable parity checking.  Not supported
  2463.  
  2464. SCSI2 - enable support for SCSI-II tagged queueing.  Untested
  2465.  
  2466.  
  2467. UNSAFE - leave interrupts enabled during pseudo-DMA transfers.  You
  2468.          only really want to use this if you're having a problem with
  2469.          dropped characters during high speed communications, and even
  2470.          then, you're going to be better off twiddling with transfersize.
  2471.  
  2472. USLEEP - enable support for devices that don't disconnect.  Untested.
  2473.  
  2474. Common Problems :
  2475. 1.  Command timeouts, aborts, etc.
  2476.  
  2477.     You should install the NCR5380 patches that I posted to the net 
  2478.     some time ago, which should be integrated into some future alpha
  2479.     release.  These patches fix a race condition in earlier NCR5380
  2480.     driver cores, as well as fixing support for multiple devices on 
  2481.     NCR5380 based boards.
  2482.  
  2483.     If that fails, you should disable the PSEUDO_DMA option by 
  2484.     changing the #define PSEUDO_DMA line in drivers/scsi/pas16.c to #undef
  2485.     PSEUDO_DMA.
  2486.  
  2487.     Note that the later should be considered a last resort, because
  2488.     there will be a severe performance degradation.
  2489.  
  2490. Section 4.18 : Ultrastor 14f (ISA), 24f (EISA), 34f (VLB)
  2491. Ports : 0x130, 0x140, 0x210, 0x230, 0x240, 0x310, 0x330, 0x340
  2492. IRQs : 10, 11, 14, 15
  2493. DMA channels : 5, 6, 7
  2494. IO : port mapped, bus master
  2495.  
  2496. Autoprobe : does not work for boards at port 0x310, BIOS not required.  
  2497.  
  2498. Autoprobe override : compile time only, define PORT_OVERRIDE
  2499.  
  2500. Common Problems :
  2501. 1.  The address 0x310 is not supported by the autoprobe code, and may 
  2502.         cause conflicts if networking is enabled.
  2503.  
  2504.         Please use a different address.
  2505.  
  2506. 2.  Using an Ultrastor at address 0x330 may cause the system to hang
  2507.         when the sound drivers are autoprobing.
  2508.  
  2509.         Please use a different address.
  2510.  
  2511. 3.  Various other drivers do unsafe probes at various addresses, if you
  2512.         are having problems with detection or the system is hanging at 
  2513.         boot time, please try a different address.
  2514.  
  2515.         0x340 is recommended as an address that is known to work.
  2516.  
  2517. 4.  Linux detects no SCSI devices, but detects your SCSI hard disk
  2518.     on an Ultrastor SCSI board as a normal hard disk, and the
  2519.     hard disk driver refuses to support it.  Note that when this 
  2520.     occurs, you will probably also get a message
  2521.     
  2522.     hd.c: ST-506 interface disk with more than 16 heads detected,
  2523.       probably due to non-standard sector translation.  Giving up.
  2524.       (disk %d: cyl=%d, sect=63, head=64)
  2525.  
  2526.     If this is the case, you are running the Ultrastor board in
  2527.     WD1003 emulation mode.  You have 
  2528.  
  2529.     1.  Switch the ultrastor into native mode.  This is the 
  2530.         recommended action, since the SCSI driver can be 
  2531.         significantly faster than the IDE driver, especially with
  2532.         the clustered read/write patches installed.  Some users have 
  2533.         sustained in excess of 2M/sec through the file system using 
  2534.         these patches.
  2535.  
  2536.         Note that this will be necessary if you wish to use any non-
  2537.         hard disk, or more than two hard disk devices on the Ultrastor.
  2538.  
  2539.     2.  Use the kernel command line switch 
  2540.  
  2541.         hd=cylinders,heads,sectors
  2542.  
  2543.         to override the default setting to bootstrap yourself,
  2544.         keeping number of cylinders <= 2048, number of heads <= 16,
  2545.         and number of sectors <= 255 such that cylinders * heads * sectors
  2546.         is the same for both mappings.
  2547.  
  2548.         You'll also have to manually specify the disk geometry when
  2549.         running fdisk under Linux.  Failure to do so will result in 
  2550.         incorrect partition entries being written, which will work
  2551.         correctly with Linux but fail under MSDOS which looks at 
  2552.         the cylinder/head/sector entries in the table.
  2553.  
  2554.         Once Linux is up, you can avoid the inconvience of having 
  2555.         to boot by hand by recompiling the kernel with an appropriately
  2556.         defined HD_TYPE macro in include/linux/config.h.
  2557.  
  2558. Section 4.19 : Western Digital 7000
  2559. Supported Configurations :
  2560. BIOS Addresses : 0xce000
  2561. Ports : 0x350
  2562. IRQs : 15
  2563. DMA Channels : 6
  2564. IO : port mapped, bus master
  2565.  
  2566. Autoprobe :  requires installed BIOS 
  2567.  
  2568. Common Problems : 
  2569.  
  2570. 1.  There are several revisisions of the chip and firmware.  Supposedly,
  2571.     revision 3 boards do not work, revision 5 boards do, 
  2572.     chips with no suffix do not work, chips with an 'A' suffix do.
  2573.  
  2574. 2.  The board supports a few BIOS addresses which aren't on the list 
  2575.     of supported addresses.  If you run into this situation,
  2576.     please use one of the supported addresses and submit a bug 
  2577.     report as outlined in Section 2, "Bug Reports"
  2578.  
  2579. Section 4.20 : AM53/79C974 (ALPHA)
  2580.     ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/AM53C974-0.3.tar.gz
  2581.  
  2582. Supported Configurations :
  2583. Ports : all
  2584. IRQs : all
  2585. DMA Channels : 6
  2586. IO : port mapped, bus master (unintelligent)
  2587.  
  2588.  
  2589.  
  2590. Section 5 : Disks 
  2591.  
  2592. This section gives information that is specific to disk drives.
  2593.  
  2594. Section 5.1 : Supported and Unsupported Hardware
  2595.  
  2596. All direct access SCSI devices with a block size of 256, 512, or 
  2597. 1024 bytes should work.  Other block sizes will not work (Note
  2598. that this can often be fixed by changing the block and/or 
  2599. sector sizes using the MODE SELECT SCSI command)
  2600.  
  2601. Sector size refers to the number of data bytes allocated per sector 
  2602. on a device, ie CDROMs use a 2048 byte sector size.  
  2603.  
  2604. Block size refers to the size of the logical blocks used to interface
  2605. with the device.  Although this is usually identical to sector size,
  2606. some devices map multiple smaller physical sectors (ie, 256 bytes
  2607. in the case of 55M Syquest drives) to larger logical blocks or 
  2608. vice versa (ie, 512 byte blocks on SUN compatable CDROM drives).
  2609.  
  2610. Removeable media devices, including Bernoulis, flopticals, MO drives,
  2611. and Syquests.
  2612.  
  2613. In theory, drives up to a terrabyte in size should work.  There is 
  2614. definately no problem with tiny 9G drives.
  2615.  
  2616. Section 5.2 : Common Problems 
  2617.  
  2618. Section 5.2.1 : Cylinder > 1024 message.
  2619.  
  2620.     When partitioning, you get a warning message about "cylinder > 1024"
  2621.     or you are unable to boot from a partition including a logical
  2622.     cylinder past logical cylinder 1024.
  2623.  
  2624.     This is a BIOS limitation.
  2625.  
  2626.     See Section 5.4 Disk Geometry and Partitioning for an explanation.
  2627.  
  2628. Section 5.2.2 :  You are unable to partition "/dev/hd*"
  2629.  
  2630.     /dev/hd* aren't SCSI devices, /dev/sd* are.  
  2631.  
  2632.     See Section 5.3, Device files, and Section 5.4, Disk
  2633.     Geometry and Partitioning
  2634.     for the correct device names and partitioning procedure.
  2635.  
  2636. Section 5.2.3 :   Unable to eject media from a removeable media drive.
  2637.  
  2638.     Linux attempts to lock the drive door when a piece of 
  2639.     media is mounted to prevent filesystem corruption due to
  2640.     an inadvertant media change.
  2641.  
  2642.     Please unmount your disks before ejecting them.
  2643.  
  2644.  
  2645. Section 5.2.4 : Unable to boot using LILO from a SCSI disk
  2646.  
  2647.     In some cases, the SCSI driver and BIOS will disagree
  2648.     over the correct BIOS mapping to use, and will result 
  2649.     in LILO hanging after 'LI' at boot time and/or 
  2650.     other problems.
  2651.  
  2652.     To workarround this, you'll have to determine your BIOS 
  2653.     geometry mapping used under DOS, and make an entry for 
  2654.     your disk in /etc/lilo/disktab.
  2655.  
  2656.     Alternatively, you may be able to use the "linear" configuration
  2657.     file option.
  2658.  
  2659. Section 5.2.5 : Fdisk responds with
  2660.  
  2661.             You must set heads sectors and cylinders.
  2662.             You can do this from the extra functions menu.
  2663.     
  2664.         and disk geometry is not 'remembered' when fdisk is rerun.
  2665.  
  2666.     See Section 5.4 : Partitioning
  2667.  
  2668. Section 5.2.6 : Only one drive is detected on a bridge board with
  2669.     multiple drives connected.
  2670.  
  2671.     Linux won't search LUNs past zero on SCSI devices which 
  2672.     predate ANSI SCSI revision 1.  If you wish devices on
  2673.     alternate LUNs to be recognized, you will have to modify
  2674.     drivers/scsi/scsi.c:scan_scsis().
  2675.  
  2676. Section 5.2.7 : System hangs when swapping
  2677.  
  2678.     We think this has been fixed, try upgrading to 1.1.38. 
  2679.  
  2680. Section 5.2.8 : Connor CFP1060S disks get corrupted
  2681.  
  2682.     This is due to a microcode bug in the read-ahead and 
  2683.     caching code.  
  2684.  
  2685.     From Soenke Behrens of Conner tech. support : 
  2686.  
  2687. During the past few weeks, we got several calls from customers stating
  2688. that they had severe problems with Conner CFP1060x 1GB SCSI drives
  2689. using the Linux operating system. Symptoms were corrupt filesystems
  2690. (damaged inodes) reported by e2fsck on each system boot and similar
  2691. errors.
  2692.  
  2693. There is now a fix available for customers with a CFP1060x (microcode
  2694. revisions 9WA1.62/1.66/1.68) and Linux. To apply the upgrade, you
  2695. will need a DOS boot disk and ASPI drivers that can access the hard
  2696. drive. The upgrade downloads new queuing and lookahead code into the
  2697. non-volatile SCSI RAM of the drive.
  2698.  
  2699. If you are experiencing problems with a disk that has microcode
  2700. revision 9WA1.60, you will have to contact your nearest Conner service
  2701. centre to get the disk upgraded. The microcode revision can be found
  2702. on the label of the drive and on the underside of the drive on a label
  2703. on one of the ICs.
  2704.  
  2705. If you are confident that you can perform the upgrade yourself, please
  2706. contact Conner Technical Support and have your microcode revision
  2707. ready. Conner Technical Support Europe can be reached on +44-1294-315333,
  2708. Conner Technical Support in the USA can be reached on 1-800-4CONNER.
  2709.  
  2710. Regards
  2711. Soenke Behrens
  2712. European Technical Support
  2713.  
  2714. Section 5.3 : Device Files
  2715.  
  2716. SCSI disks use block device major 8, and there are no "raw" devices
  2717. ala BSD.
  2718.  
  2719. 16 minor numbers are allocated to each SCSI disk, with minor % 16 == 0 
  2720. being the whole disk, minors  1 <= (minor % 16) <= 4 the four primary 
  2721. partitions, minors 5 <= (minor % 16) <= 15 any extended partitions.
  2722.  
  2723. Ie, a configuration may work out like this (with one host adapter)
  2724.  
  2725. Device            Target, Lun        SCSI disk
  2726. 84M Seagate         0    0        /dev/sda
  2727. SCSI->SMD bridge disk 0    3    0        /dev/sdb 
  2728. SCSI->SMD bridge disk 1    3    1        /dev/sdc
  2729. Wangtek tape        4    0        none
  2730. 213M Maxtor        6    0        /dev/sdd
  2731.  
  2732. Etc.  
  2733.  
  2734. The standard naming convention is 
  2735.  
  2736. /dev/sd{letter} for the entire disk device ((minor % 16) == 0)
  2737. /dev/sd{letter}{partition} for the partitions on that device 
  2738.     (1 <= (minor % 16) <= 15)
  2739.  
  2740. Ie
  2741.  
  2742. /dev/sda    block device major 8 minor 0
  2743. /dev/sda1    block device major 8 minor 1
  2744. /dev/sda2    block device major 8 minor 2
  2745. /dev/sdb    block device major 8 minor 16
  2746.  
  2747. etc.
  2748.  
  2749. Section 5.4 : Partitioning
  2750.  
  2751. You can partition your SCSI disks using the partitioning program
  2752. of your choice, under DOS, OS/2, Linux or any other operating 
  2753. system supporting the standard partitioning scheme. 
  2754.  
  2755. The correct way to run the Linux fdisk program is by specifying the
  2756. device on the command line. Ie, to partition the first SCSI disk,
  2757.  
  2758.     fdisk /dev/sda
  2759.  
  2760. If you don't explicitly specify the device, the partitioning program
  2761. may default to /dev/hda, which isn't a SCSI disk.
  2762.  
  2763. In some cases, fdisk will respond with 
  2764.  
  2765.     You must set heads sectors and cylinders.
  2766.     You can do this from the extra functions menu.
  2767.  
  2768.     Command (m for help): 
  2769.  
  2770. and/or give a message to the effect that the HDIO_REQ or 
  2771. HDIO_GETGEO ioctl failed.  In these cases, you must 
  2772. manually specify the disk geometry as outlined in Subsection
  2773. 5.5 : Disk Geometry when running fdisk, and also in /etc/disktab
  2774. if you wish to boot kernels off that disk with LILO.
  2775.  
  2776. If you have manually specified the disk geometry, subsequent
  2777. attempts to run fdisk will give the same error message.  This 
  2778. is normal, since PCs don't store the disk geometry information
  2779. in the partition table. In and of itself, will cause _NO PROBLEMS_,
  2780. and you will have no problems accessing partitions you created on
  2781. the drive with Linux.  Some vendors' poor installation code will 
  2782. choke on this, in which case you should contact your vendor
  2783. and insist that they fix the code.
  2784.  
  2785. In some cases, you will get a warning message about a partition ending
  2786. past cylinder 1024.  If you create one of these partitions, you will 
  2787. be unable to boot Linux kernels off of that partition using LILO.  Note,
  2788. however, that this restriction does not preclude the creation of a 
  2789. root partition partially or entirely above the 1024 cylinder mark,
  2790. since it is possible to create a small /boot partition below the 
  2791. 1024 cylinder mark or to boot kernels off existing partitions.
  2792.  
  2793. Section 5.5 : Disk Geometry 
  2794.  
  2795. Under Linux, each disk is viewed as the SCSI host adapter sees it : 
  2796. N blocks, numbered from 0 to N-1, all error free, where as DOS/BIOS
  2797. predate intelligent disks and apply an arbitrary head / cylinder / 
  2798. sector mapping to this linear addressing.
  2799.  
  2800. This can pose a problem when you partition the drives under Linux,
  2801. since there is no portable way to get DOS/BIOS's idea of the mapped 
  2802. geometry.  In most cases, a HDIO_GETGEO ioctl() can be implemented 
  2803. to return this mapping.  Unfortunately, when the vendor (ie Seagate)
  2804. has chosen a perverse, non-standard, and undocumented mapping, this 
  2805. is not possible and geometry must be manually specified
  2806.  
  2807. If manual specification of the is required, you have one of several
  2808. options :
  2809.  
  2810. 1.  If you don't care about using DOS, or booting kernels from the 
  2811.     drive with LILO, create a translation such that heads * cylinders * 
  2812.     sectors * 512 < size of your drive in bytes (a megabyte is defined 
  2813.     as 2^20 bytes).
  2814.  
  2815.  
  2816.     1 <= heads <= 256
  2817.     1 <= cylinders <= 1024 
  2818.     1 <= sectors <= 63
  2819.  
  2820. 2.  Use the BIOS mapping.  In some cases, this will mean reconfiguring the 
  2821.     disk so that it is at SCSI ID 0, and disabling the second IDE drive (if you have one).
  2822.  
  2823.     You can either use a program like NU, or you can use the following 
  2824.     program :
  2825.  
  2826. begin 664 dparam.com
  2827. MBAZ``##_B+^!`+N!`(H'0SP@=/D\,'5:@#]X=`6`/UAU4(!_`3AU2H!_`P!U
  2828. M1(I7`H#J,(#Z`7<Y@,*`M`C-$PCD=3-14HC()#\PY.@R`.@J`%J(\/[`,.3H
  2829. M)0#H'0!8AL2Q!M+L0.@7`+K"`;0)S2'#NIP!ZR"ZQ0'K&[K5`>L6N]T!,=*Y
  2830. M"@#W\8#",$N(%PG`=>^)VK0)S2'#=7-A9V4Z(&1P87)A;2`P>#@P#0H@("!O
  2831. L<B`@9'!A<F%M(#!X.#$-"B1);G9A;&ED(&1R:79E#0HD("`D```````D``!O
  2832. `
  2833. end
  2834.  
  2835.     When run it prints the sectors, heads, and cylinders of the 
  2836.     drive whose BIOS address was specified on the command line (0x80
  2837.     is the first disk, 0x81 the second).
  2838.  
  2839.     Ie, dparam 0x80
  2840.     60    17    1007
  2841.  
  2842. Would mean that C: had 60 sectors, 17 heads, and 1007 cylinders.
  2843.  
  2844. Section 6 : CD ROMs
  2845.  
  2846. This section gives information that is specific to cdrom drives.
  2847.  
  2848. Section 6.1 : Supported and Unsupported Hardware
  2849.  
  2850. SCSI CDs with a block size of 512 or 2048 bytes should work.  Other
  2851. block sizes will not work.
  2852.  
  2853. Section 6.2 : Common Problems
  2854.  
  2855. Section 6.2.1 : Unable to mount cdrom.
  2856.  
  2857.         The correct syntax to mount an ISO-9660 CDROM is
  2858.  
  2859.         mount -t iso9660 /dev/sr0 /mount_point -o ro
  2860.  
  2861.         Note that for this to work, you must have the kernel
  2862.         configured with support for SCSI, your host adapter,
  2863.         the SCSI CDROM driver, and the iso9660 filesystem.
  2864.  
  2865.     Note that as of Linux 1.1.32, read-only devices such
  2866.     as CDROMs CANNOT be mounted with the default read/write
  2867.     options.
  2868.  
  2869. Section 6.2.2 : Unable to eject cdrom.
  2870.  
  2871.     Linux attempts to lock the drive door when a piece of 
  2872.     media is mounted to prevent filesystem corruption due to
  2873.     an inadvertant media change.
  2874.  
  2875. Section 6.2.3 : Unable to play audio.
  2876.  
  2877.     The programs Workman or xcdplayer will do this for you.
  2878.  
  2879. Section 6.2.4 :  Workman or Xcdplayer do not work.
  2880.  
  2881.     The functions to control audio functions are part of the
  2882. SCSI-II command set, so any drive that is not SCSI-II will probably
  2883. not work here.  Also, many SCSI-I and some SCSI-II CDROM drives use a
  2884. proprietary command set for accessing audio functions instead of the
  2885. SCSI-II command set.  For NEC drives, there is a version of xcdplayer
  2886. specially adapted to use this command set floating around - try
  2887. looking on tsx-11.mit.edu in pub/linux/BETA/cdrom.
  2888.  
  2889.     These programs may work with some of the non-SCSI cdrom drives
  2890. if the driver implements the same ioctls as the scsi drivers.
  2891.  
  2892. Section 6.2.5: Additional drives on CD ROM changers do not work
  2893.  
  2894.     Most CD changers assign each disc to a logical unit.  Insure that 
  2895. you have special files made for each platter (see Section 6.3 : Device Files)
  2896. and see Section 1.10 : LUNS other than 0 don't work
  2897.  
  2898. Section 6.3 : Device Files
  2899.  
  2900. SCSI CD ROMs use major 11.
  2901.  
  2902. Minors are allocated dynamically (See Section 5 : Disks, Subsection 5.3 :
  2903. Device Files for an example) with the first CDROM found being minor 0,
  2904. the second minor 1, etc.
  2905.  
  2906. The standard naming convention is 
  2907.  
  2908. /dev/sr{digit}, although some distributions have used /dev/scd{digit}, with
  2909. examples being
  2910.  
  2911. /dev/sr0    /dev/scd0
  2912. /dev/sr1    /dev/scd1
  2913.  
  2914. Section 7 : Tapes
  2915.  
  2916. This setion gives information that is specific to scsi tape drives.
  2917.  
  2918. Section 7.1 : Supported and Unsupported Hardware
  2919.  
  2920. Drives using both fixed and variable length blocks smaller than the
  2921. the driver buffer length (set to 32K in the distribution sources) are
  2922. supported.
  2923.  
  2924. Parameters (block size, buffering, density) are set with ioctls
  2925. (usually with the mt program), and remain in effect after the 
  2926. device is closed and reopened.
  2927.  
  2928. Virtually all drives should work, including :
  2929.     Archive Viper QIC drives, including the 150M and 525M models
  2930.     Exabyte 8mm drives
  2931.     Wangtek 5150S drives
  2932.     Wangdat DAT drives
  2933.  
  2934. Section 7.2 : Common Problems
  2935.  
  2936. Section 7.2.1 : Tape drive not recognized at boot time.
  2937.  
  2938.     Try booting with a tape in the drive.
  2939.  
  2940. Section 7.2.2 :  Tapes with multiple files cannot be read properly.
  2941.  
  2942.     When reading a tape with multiple files, the first tar 
  2943.     is successful, a second tar fails silently, and retrying 
  2944.     the second tar is successful.
  2945.  
  2946.     User level programs, such as tar, don't understand file marks.
  2947.     The first tar reads up until the end of the file.  The second 
  2948.     tar attempts to read at the file mark, gets nothing, but the 
  2949.     tape spaces over the file mark.  The third tar is successful
  2950.     since the tape is at the start of the next file.
  2951.  
  2952.     Use mt on the no-rewind device to space forward to the next file.
  2953.  
  2954.  
  2955. Section 7.2.3 :  Decompression fails.
  2956.  
  2957.     Decompressing programs cannot handle the zeros padding the 
  2958.     last block of the file. 
  2959.  
  2960.     To prevent warnings and errors, wrap your compressed files 
  2961.     in a .tar file - ie, rather than doing 
  2962.  
  2963.     tar cfvz /dev/nrst0 file.1 file.2 ...
  2964.  
  2965.     do 
  2966.  
  2967.     tar cfvz tmp.tar.z file.1 file.2 ...
  2968.  
  2969.     tar cf /dev/nrst0 tmp.tar.z
  2970.  
  2971. Section 7.2.4 :  Problems taking tapes to/from other systems.
  2972.  
  2973.     You can't read a tape made with another operating system or
  2974.     another operating system can't read a tape written in Linux.
  2975.  
  2976.     Different systems often use different block sizes.  On a
  2977.     tape device using a fixed blocksize, you will get errors 
  2978.     when reading blocks written using a different block size.
  2979.  
  2980.     To read these tapes, you must set the blocksize of 
  2981.     the tape driver to match the blocksize used when
  2982.     the tape was written, or to variable.
  2983.  
  2984.     NOTE : this is the hardware block size, not the blocking
  2985.     factor used with tar, dump, etc.
  2986.  
  2987.     You can do this with the mt command - 
  2988.  
  2989.     
  2990.         mt setblk <size>
  2991.  
  2992.     or 
  2993.     
  2994.         mt setblk 0
  2995.  
  2996.     to get variable block length support. 
  2997.     
  2998.  
  2999.     Note that these mt flags are NOT supported under the GNU version
  3000.     of mt which is included with some Linux distributions.  Instead,
  3001.     you must use the BSD derrived Linux SCSI mt command.  Source
  3002.     should be available from
  3003.  
  3004.         tsx-11.mit.edu:/pub/linux/ALPHA/scsi
  3005.  
  3006.     Also note that by default, ST_BUFFER_BLOCKS (defined
  3007.     in /usr/src/linux/drivers/scsi/st_options.h in newer
  3008.     kernels, st.c in older kernels) is set to allow for 
  3009.     a 32K maximum buffer size; you'll need to edit the source 
  3010.     to use larger blocks.
  3011.  
  3012. Section 7.2.5 :  "No such device" error message.
  3013.  
  3014.     All attempts to access the tape result in a 
  3015.  
  3016.     "No such device"
  3017.  
  3018.     or similar error message.  Check the type of 
  3019.     your tape device - it MUST be a character device with 
  3020.     major and minor numbers matching those specified in subsection
  3021.     C, Device Files.
  3022.  
  3023. Section 7.2.6 : Tape reads at a given density work, writes fail
  3024.  
  3025.     Many tape drives support reading at lower densities
  3026.     for compatability with older harware, but will not 
  3027.     write at those same densities.  
  3028.  
  3029.     This is especially the case with QIC drives, which
  3030.     will read old 60M tapes but only write new 120, 150,
  3031.     250, and 525M formats.
  3032.  
  3033. Section 7.2.6 : Repositioning the tape locks out access to all SCSI devices
  3034.  
  3035.     This is most common with SCSI drivers which only support one 
  3036.     outstanding command at a time (see Section 9.5 : Multiple
  3037.     devices for an explanation, and Section : Driver feature comparison
  3038.     to see which drivers suffer from this limitation), although there may 
  3039.     be a few tape drives out there which refuse to disconnect.  
  3040.  
  3041.     In either case, you can work arround the problem by editing 
  3042.     drivers/scsi/st.c and adding a 
  3043.  
  3044.         #define ST_NOWAIT
  3045.  
  3046.     at the top and rebuilding the kernel.
  3047.  
  3048.     Note that this will defer error condition reporting until the 
  3049.     next SCSI command is executed.  For this reason, you may want to 
  3050.     do something like a   
  3051.  
  3052.         mt status
  3053.  
  3054.     after a mt file positioning command so you don't overwrite tape 
  3055.     files if the positioning command failed.
  3056.  
  3057.     You may also wish to consider changing to a better-supported SCSI
  3058.     board or newer tape drive if you need to use this workarround
  3059.     and are writing multiple files to tapes.
  3060.  
  3061. Section 7.3 : Device Files
  3062.  
  3063. SCSI tapes use character device major 9.  
  3064.  
  3065. Due to constraints imposed by Linux's use of a sixteen bit dev_t with
  3066. only eight bits allocated to the minor number, the SCSI tape minor 
  3067. numbers are assigned dynamically starting with the lowest SCSI HOST/ID/LUN.
  3068.  
  3069. Rewinding devices are numbered from 0 - with the first 
  3070. SCSI tape, /dev/rst0 being c 9 0, the second /dev/rst1 c 9 1, etc.  
  3071. Non-rewinding devices have the high bit set in the minor number, 
  3072. ie /dev/nrst0 is c 9 128.
  3073.  
  3074. The standard naming convention is 
  3075. /dev/nst{digit}     for non-rewinding devices
  3076. /dev/st{digit}        for rewinding devices
  3077.  
  3078. Section 8 : Generic 
  3079.  
  3080. This information gives information that is specific to the generic
  3081. scsi driver.
  3082.  
  3083. Section 8.1 : Supported Hardware 
  3084.  
  3085. The Generic SCSI device driver provides an interface for sending 
  3086. SCSI commands to all SCSI devices - disks, tapes, CDROMs, media
  3087. changer robots, etc. 
  3088.  
  3089. Everything electrically compatable with your SCSI board should work.
  3090.  
  3091. Section 8.2 : Common Problems
  3092.  
  3093. None :-).
  3094.  
  3095. Section 8.3 : Device Files
  3096.  
  3097. SCSI generic devices use character major 21.  Due to constraints 
  3098. imposed by Linux's use of a 16 bit dev_t, minor numbers are dynamically
  3099. assigned from 0, one per device, with
  3100.  
  3101. /dev/sg0 
  3102.  
  3103. corresponding to the lowest numerical target/lun on the first 
  3104. SCSI board.
  3105.  
  3106. Section 9 : Buyers' Guide
  3107.  
  3108.     A frequent question is:
  3109.  
  3110.     "Linux supports quite a number of different boards, so which
  3111. scsi host adapter should I get."
  3112.  
  3113.     The answer depends upon how much performance you expect or need, 
  3114. motherboard, and the scsi peripherals that you plan on attaching to 
  3115. your machine.
  3116.  
  3117. Section 9.1 : Transfer types
  3118.  
  3119.     The biggest factor affecting performance (in terms of throughput
  3120. and interactive response time during SCSI I/O) is the transfer type used.
  3121. The table below lists the various transfer types, the effects they have
  3122. on performance, and some recomendations as to their use.
  3123.  
  3124. Transfer type    Description / Performance / Recomendedations
  3125. Pure        A pure polled I/O board will use the CPU to handle 
  3126. Polled        all of the SCSI processing, including the REQ/ACK
  3127.         handshaking.
  3128.  
  3129.         Even a fast CPU will be slower handling the REQ/ACK
  3130.         handshake sequence than a simple finite state machine,
  3131.         resulting in peak transfer rates of about 150K/sec on
  3132.         a fast machine, perhaps 60K/sec on a slow machine 
  3133.         (through the filesystem).
  3134.  
  3135.         The driver also must sit in a tight loop as long as the 
  3136.         SCSI bus is busy, resulting in near 100% CPU utilitization
  3137.         and extremely poor responsiveness during SCSI I/O.
  3138.         Slow CDROMs which don't disconnect/reconnect will kill 
  3139.         interactive performance with these boards.
  3140.  
  3141.         Not recommended.
  3142.  
  3143. Interlocked    Boards using interlocked polled I/O are essentially
  3144. Polled        the same as pure polled I/O boards, only the SCSI REQ/ACK 
  3145.         handshaking signals are interlocked with the PC bus 
  3146.         handshaking signals.  All SCSI processing beyond 
  3147.         the handshaking is handled by the CPU.
  3148.  
  3149.         Peak transfer rates of 500-600K/sec through the 
  3150.         filesystem are possible on these boards.
  3151.  
  3152.         As with pure polled I/O boards, the driver must sit 
  3153.         in a tight loop as long as the SCSI bus is busy, 
  3154.         resulting in CPU utilization dependant on the 
  3155.         transfer rates of the devices, and when they 
  3156.         disconnect/reconnect.  CPU utilization may vary 
  3157.         between 25% for single speed CDs which handle
  3158.         disconnect/reconnect properly to 100% for faster
  3159.         drives or broken CD ROMs which fail to disconnect/reconnect.
  3160.  
  3161.         On my 486-66, with a T128, I use 90% of my CPU time to 
  3162.         sustain a throughput of 547K/sec on a drive 
  3163.         with a headrate of 1080K/sec with a T128 board.
  3164.  
  3165.         Sometimes acceptable for slow tapes and CDROMs when 
  3166.         low cost is essential.
  3167.  
  3168. FIFO         Boards using FIFO polled I/O put a small (typically 8K)
  3169. Polled        buffer between the CPU and the SCSI bus, and often implement
  3170.         some amount of intelligence.  The net effect is that 
  3171.         the CPU is only tied up when it is transfering data
  3172.         at top speed to the FIFO and when it's handling the 
  3173.         rest of the interrupt processing for FIFO empty conditions,
  3174.         disconnect/reconnect, etc.
  3175.  
  3176.         Peak transfer rates should be sufficient to handle
  3177.         most SCSI devices, and have been measured at up 
  3178.         to 4M/sec using raw SCSI commands to read 64K 
  3179.         blocks on a fast Seagate Barcuda with an Adaptec 
  3180.         1520.
  3181.  
  3182.         CPU utilization is dependant on the transfer
  3183.         rates of the  devices, with faster devices generating
  3184.         more interrupts per unit time which require more CPU 
  3185.         processing time.   Although CPU usage may be high
  3186.         (perhaps 75%) with fast devices, the system usually 
  3187.         remains usable.  These boards will provide excellent
  3188.         interactive performance with broken devices which 
  3189.         don't disconnect/reconnect (typically cheap CDROM 
  3190.         drives)
  3191.  
  3192.         Recommended for persons on a budget.
  3193.  
  3194. Slave          Drivers for boards using slave DMA program the PC's 
  3195. DMA        DMA controller for a channel when they do a data transfer,
  3196.         and return control to the CPU.
  3197.  
  3198.         Peak transfer rates are usually handicapped 
  3199.         by the poor DMA controller used on PCs, 
  3200.         with one such 8-bit board having problems
  3201.         going faster than 140-150K/sec with one mainboard.
  3202.  
  3203.         CPU utilization is very reasonable, slightly 
  3204.         less than what is seen with FIFO polled I/O boards.
  3205.         These boards are very tollerant of broken devices 
  3206.         which don't disconnect/reconnect (typically cheap
  3207.         CSG limitDROM drives).
  3208.  
  3209.         Acceptable for slow CDROM drives, tapes, etc.
  3210.  
  3211. Busmastering    These boards are intelligent.  Drivers 
  3212. DMA         for these boards throw a SCSI command, the destination
  3213.         target and lun, and where the data should end up
  3214.         in a structure, and tell the board "Hey, I have 
  3215.         a command for you."  The driver returns control
  3216.         to various running programs, and eventually the 
  3217.         SCSI board gets back and says that it's done.
  3218.  
  3219.         Since the intelligence is in the host adapter
  3220.         firmware and not the driver, drivers for these
  3221.         boards typically support more features - synchronous
  3222.         transfers, tagged queing, etc.
  3223.  
  3224.         With the clustered read/write patches, peak transfer
  3225.         rates through the file system approach 100% of head rate 
  3226.         writing, 75% reading.  
  3227.  
  3228.         CPU utilization is minimal, irregardless of 
  3229.         I/O load, with a measured 5% CPU usage while 
  3230.         accessing a double speed CDROM on an Adaptec 1540 
  3231.         and 20% while sustaining a 1.2M/sec transfer rate
  3232.         on a SCSI disk. 
  3233.  
  3234.         Recommended in all cases where money is not extremely
  3235.         tight, the main board is not broken (some broken main boards
  3236.         do not work with bus masters), and applications where time 
  3237.         to data is more important than throughput are not being run 
  3238.         (bus master overhead may hit 3-4ms per command).
  3239.  
  3240. Section 9.2 : Scatter/gather
  3241.  
  3242.     The second most important driver/hardware feature with respect 
  3243. to performance is support for scatter/gather I/O.  The overhead of executing 
  3244. a SCSI command is significant - on the order of milliseconds. Intelligent bus 
  3245. masters like the Adaptec 1540 may take 3-4ms to process a SCSI command before 
  3246. the target even sees it.  On unbuffered devices, this overhead is allways enough 
  3247. to slip a revolution, resulting in a transfer rate of about 60K/sec 
  3248. (assuming a 3600RPM drive) per block transfered at a time.  So, to maximize 
  3249. performance, it is necessary to minimize the number of SCSI commands needed 
  3250. to transfer a given amount of data by transfering more data per command.  Due 
  3251. to the design of the Linux buffer cache, contiguous disk blocks are not 
  3252. contiguous in memory. With the clustered read/write patches, 4K worth of 
  3253. buffers are contiguous.  So, the maximum amount of data which can 
  3254. be transfered per SCSI command is going to be 1K * # of scatter/gather
  3255. regions without the clustered read/write patches, 4K * # of regions
  3256. with.  Experimentally, we've determined that 64K is a reasonable 
  3257. amount to transfer with a single SCSI command - meaning 64 scatter/gather
  3258. buffers with clustered read/write patches, 16 without.  With the 
  3259. change from 16K to 64K transfers, we saw an improvement from 
  3260. 50% of headreate, through the filesystem, reading and writing,
  3261. to 75% and 100% respectively using an Adaptec 1540 series board.
  3262.  
  3263. Section 9.3 : Mailbox vs. non-mailbox
  3264.  
  3265.     A number of intelligent host adapters, such as the Ultrastor, WD7000,
  3266. Adaptec 1540, 1740, and BusLogic boards have used a mailbox-metaphor 
  3267. interface, where SCSI commands are executed by putting a SCSI command 
  3268. structure in a fixed memory location (mailbox), signaling the board (ie, 
  3269. raising the outgoing mail flag), and waiting for a return (incoming mail).  
  3270. With this high level programming interface, users can often upgrade to a 
  3271. newer board revision to take advantage of new features, such as FAST + 
  3272. WIDE SCSI, without software changes.  Drivers tend to be simpler to 
  3273. implement, may implement a larger feature set, and may be more stable.
  3274.  
  3275. Other intelligent host adapters, such as the NCR53c7/8xx family,
  3276. and Adaptec AIC-7770/7870 chips (including the 274x, 284x, and 2940
  3277. boards) use a lower level programming interface.  This may prove
  3278. faster since processing can be shifted between the board's processor
  3279. and faster host CPU, allow better flexibility in implementing certain 
  3280. features (ie, target mode for arbitrary devices), and these boards 
  3281. can be built for less money (In some cases, this is passed on to 
  3282. the consumer (ie, most NCR boards)).  On the down side, drivers
  3283. tend to be more complex (read : there is more potential for bugs), 
  3284. and must be modified to take advantage of the features present on 
  3285. newer chips.
  3286.  
  3287. Section 9.4 : Bus types
  3288.  
  3289.     Bus type is the next thing to consider, with choices including ISA,
  3290. EISA, VESA, and PCI.  Marketing types often spout of absurd bandwidth
  3291. numbers based on burst transfer rates and fiction, which isn't very 
  3292. useful.  Instead, I've chosen to state "real-world" numbers based on 
  3293. measured performance with various peripherials.
  3294.  
  3295. Bus    Bandwidth, description, 
  3296. ISA    Bandwidth is slightly better than 5M/sec for  busmastering 
  3297.     devices.  With an ISA bus, arbitration for busmasters is performed 
  3298.     by the venerable 8237 third party DMA controller, resulting in 
  3299.     relatively high bus aquisition times.  Interrupt drivers are
  3300.     tri-state and edge triggered, meaning interrupts cannot be 
  3301.     shared. Generally, ISA is unbuffered, meaning the host/memory
  3302.     bus is tied up whenever a transfer is occuring. No mechanism
  3303.     is provided to prevent bus-hogging.
  3304.  
  3305. VESA    Bandwidth is about 30M/sec.  Some VESA systems run the bus out 
  3306.     of spec, rendering them incompatable with some boards, so this
  3307.     should be taken into consideration before purchasing hardware
  3308.     without a return guarantee.  Generally, VESA is unbuffered, meaning
  3309.     meaning the host/memory bus is tied up whenever a transfer is 
  3310.     occuring.
  3311.  
  3312. EISA    Bandwidth is about 30M/sec, with busmastering operations generally
  3313.     being faster than VESA.  Some EISA systems buffer the bus, allowing
  3314.     burst transfers to the faster host/memory bus and minimizing impact
  3315.     on CPU performance.  EISA interrupt drivers may be either tri-state
  3316.     edge-triggered or open collector level-active, allowing interrupt
  3317.     sharing with drivers that support it.  Since EISA allocates a 
  3318.     separate address space for each board, it is usually less prone to 
  3319.     resource conflicts than ISA or VESA.
  3320.  
  3321. PCI    Bandwidth is about 60M/sec.  Most PCI systems implement write
  3322.     posting buffers on the host bridge, allowing speed mismatches
  3323.     on either side to have a minimum impact on bus/CPU performance.  
  3324.     PCI interrupt drivers are open collector level-active, allowing
  3325.     interrupt sharing with drivers that support it. Mechanisms
  3326.     are provided to prevent bus hogging, and for both master and 
  3327.     slave to suspend a bus-mastering operation. 
  3328.  
  3329.     Since PCI provides a plug-n-play mechanism with writeable 
  3330.     configuration registers on every board, in a separate address space, 
  3331.     a propperly implemented PCI system is plug-and play.  
  3332.  
  3333.     PCI is extremely strict as to trace length, loading, mechanical
  3334.     specifications, etc. and ultimately should be more reliable than
  3335.     VESA or ISA.
  3336.  
  3337.     In summary, PCI is the best PC bus, although it does
  3338.     have its dark side.  PCI is still in its infancy, and although
  3339.     most manufacturers have ironed out the problems, there is 
  3340.     still stock of older, buggy PCI hardware and broken main 
  3341.     BIOSes.  For this reason, I _strongly_ recommend a return
  3342.     guarantee on the hardware.  While the latest PCI mainboards
  3343.     are truly plug-and-play, older PCI boards may require the 
  3344.     user to set options with both jumpers and in software (ie,
  3345.     interrupt assignments).  Although many users have 
  3346.     resolved their PCI problems, it has taken time and for this
  3347.     reason I cannot recommend a PCI purchase if having the 
  3348.     system operational is extremely time critical.
  3349.  
  3350.     For many slower SCSI devices, such as disks with head rates 
  3351. arround 2M/sec or less, CDROMs, and tapes, there will be little difference
  3352. in throughputs with the different PC bus interfaces.  For faster contemporary
  3353. SCSI drives (Typical high end multi-gigabyte drives have a head rate of 
  3354. 4-5M/sec, and at least one company is currently ALPHA testing a parallel
  3355. head unit with a 14M/sec head rate), throughput will often be significantly 
  3356. better with controllers on faster busses, with one user noting a 2.5 fold 
  3357. performance improvement when going from an Adaptec 1542 ISA board to a 
  3358. NCR53c810 PCI board. 
  3359.  
  3360.     With the exception of situations where PCI write-posting or a 
  3361. similar write-buffering mechanism is being used, when one of the busses in 
  3362. your system is busy, all of the busses will be unaccessable.  So, although 
  3363. bus saturation may not be interfering with SCSI performance, it may have a 
  3364. negative effect on interactive performance.  Ie, if you have a 4M/sec SCSI 
  3365. disk under ISA, you'll have lost 80% of your bandwidth, and in an 
  3366. ISA/VESA system would only be able to bitblt at 6M/sec.  In most cases,
  3367. a similar impact on processing jobs in the background would also be felt.
  3368.  
  3369.     Note that having over 16M of memory does not preclude using
  3370. an ISA busmastering SCSI board.  Unlike various broken operating
  3371. systems, Linux will double buffer when using a DMA with an ISA controller
  3372. and a transfer is ultimately destined for an area above 16M.  Performance
  3373. on these transfers only suffers by about 1.5%, ie not noticably.
  3374.  
  3375.     Finally, the price difference between bus masters offered with the 
  3376. different bus interfaces is often minimal.  
  3377.  
  3378.     With all that in mind, based on your priorities you will have 
  3379. certain bus preferences 
  3380.  
  3381.     Stability, time critical installations,      EISA ISA VESA PCI
  3382.         and poor return policies
  3383.     Performance, and typical hobbiest        PCI EISA VESA ISA
  3384.         installations
  3385.  
  3386.  
  3387.      As I pointed out earlier, bus mastering versus other transfer modes is 
  3388. going to have a bigger impact on total system performance, and should be 
  3389. considered more important than bus type when purchasing a SCSI controller.
  3390.  
  3391. Section 9.5 : Multiple devices
  3392.  
  3393.     If will you have multiple devices on your SCSI bus, you may
  3394. want to see whether the host adapter/driver that you are considering supports
  3395. more than one outstanding command at one time.  This is almost 
  3396. essential if you'll be running a tape drive, and very desireable
  3397. if you are mixing devices of different speeds, like a CD ROM and a disk 
  3398. drive.  If the linux driver only supports one outstanding command, you may 
  3399. be locked out of your disk drive while a tape in the tape drive is rewinding or
  3400. seeking to end of media (perhaps for half an hour).  With two
  3401. disk drives, the problem will not be as noticeable, allthough 
  3402. throughput would approach the average of the two transfer rates 
  3403. rather than the sum of the two transfer rates.
  3404.  
  3405. Section 9.6: SCSI-I, SCSI-II, SCSI-III FAST and WIDE options, etc.
  3406.  
  3407.     Over the years, SCSI has evolved, with new revisions of the standard
  3408. introducing higher transfer rates, methods to increase throughput, standardized
  3409. commands for new devices, and new commands for previously supported devices.
  3410.  
  3411.     In and of themselves, the revision levels don't really mean anything.  
  3412. Excepting minor things like SCSI-II not allowing the single initiator option
  3413. of SCSI-I, SCSI is backwards compatable, with new features being introduced 
  3414. as options and not mandatory.  So, the descision to call a SCSI adapter 
  3415. SCSI, SCSI-II, or SCSI-III is almost entirely a marketing one.  
  3416.  
  3417. Section 9.7 : Driver feature comparison
  3418.  
  3419. Driver feature comparison (supported chips are listed in parenthesis)
  3420.  
  3421. Driver                  Simultaneous    SG         > 1 
  3422.         Transfer mode        Commands    limit        Boards
  3423.                     total/LUN
  3424. AM53C974    Busmastering DMA    12s/1s        255s        Y
  3425. aha152x          FIFO(8k) Polled           7s/1s        255s        N
  3426.     (AIC6260,
  3427.     AIC6360)
  3428. aha1542       Busmastering DMA     8s/1s        16        Y
  3429. aha1740          Busmastering DMA     32s        16        N
  3430. aha274x        Busmastering DMA    4s/1s        255s        Y
  3431. BusLogic    Busmastering DMA    192/31        128s, 8192h    Y
  3432. (values are for BT-948/958/958D, older boards support fewer commands)
  3433. eata_dma        Busmastering DMA        64s-8192h/2-64  512s, 8192h     Y
  3434. fdomain        FIFO(8k) Polled        1s        64s        N
  3435.     (TMC1800,     except TMC18c30
  3436.     TMC18c30,    with 2k FIFO
  3437.     TMC18c50,
  3438.     TMC36c70)
  3439.  
  3440. in2000*        FIFO(2k) Polled        1s        255s        N
  3441. g_NCR5380    Pure Polled         16s/2s        255s        Y
  3442.     (NCR5380,
  3443.     NCR53c80,
  3444.     NCR5381, 
  3445.     NCR53c400)
  3446. gsi8*        Slave DMA        16s/2s        255s
  3447.     (NCR5380)
  3448. PAS16        Pure Polled        16s/2s        255s        Y
  3449.     (NCR5380)    or Interlocked Polled
  3450.         (fails on some systems!)
  3451. seagate        Interlocked Polled    1s/1s        255s        N
  3452. wd7000          Busmastering DMA    16s/1s        16         Y
  3453. t128        Interlocked Polled    16s        255s        Y
  3454.     (NCR5380)
  3455. qlogic        Interlocked Polled    1s/1s        255s        N
  3456. ultrastor     Busmastering DMA    16s/2s        32        Y
  3457. 53c7,8xx    Busmastering DMA    
  3458.     (NCR53c810,
  3459.      NCR53c815,
  3460.      NCR53c820,
  3461.      NCR53c825)
  3462.     rel5                 1s/1s        127s        N
  3463.     rel10                8s/1s        127s        Y
  3464.     
  3465.  
  3466. Notes : 
  3467. 1.  drivers flagged with an '*' are not included with the 
  3468.     distribution kernel, and binary boot images may be unavailable.
  3469.  
  3470. 2.  numbers suffixed with an 's' are arbitrary limits set in software 
  3471.     which may be changed with a compile time define.  
  3472.  
  3473. 3.  hardware limits are indicated by an 'h' suffix, and may differ
  3474.     from the software limits currently imposed by the Linux drivers.
  3475.  
  3476. 4.  unsuffixed numbers may indicate either hard or soft limits.
  3477.  
  3478. 5.  rel5 of the NCR53c810 driver is included in the stock 1.2.x and 
  3479.     1.3.x kernels; rel10 is available via anonymous FTP.
  3480.  
  3481. 6.  With the exception of the AM53C974, the busmastering DMA boards
  3482.     are intelligent; with the NCR executing microcode from main memory,
  3483.     the AIC7770 executing microcode from on-chip RAM, and the rest using
  3484.     a mailbox-style interface.
  3485.  
  3486. Section 9.8 : Board comparison 
  3487.  
  3488. Board            Driver        Bus    Price    Notes
  3489. Adaptec AIC-6260    aha152x        ISA        chip, not board
  3490. Adaptec AIC-6360    aha152x        VLB        chip, not board
  3491.     (Used in most 
  3492.     VESA/ISA multi-IO
  3493.     boards with SCSI,
  3494.     Zenon mainboards)
  3495. Adaptec 1520        aha152x        ISA         
  3496. Adaptec 1522        aha152x        ISA    $80    1520 w/FDC
  3497. Adaptec 1510        aha152x        ISA        1520 w/out boot ROM,
  3498.                             won't autoprobe.
  3499. Adaptec 1540C        aha1542        ISA        
  3500. Adaptec 1542C        aha1542        ISA        1540C w/FDC
  3501. Adaptec 1540CF        aha1542        ISA        FAST SCSI-II
  3502. Adaptec 1542CF        aha1542        ISA    $200    1540CF w/FDC
  3503. Adaptec 1640        aha1542        MCA        
  3504.  
  3505. Adaptec 1740        aha1740        EISA        discontinued
  3506. Adaptec 1742        aha1740        EISA        discontinued, 1740 
  3507.                             w/FDC
  3508. Adaptec 2740        aha274x        EISA
  3509. Adaptec 2742        aha274x        EISA        w/FDC
  3510. Adaptec 2840        aha274x        VLB
  3511. Adaptec 2842        aha274x        VLB        w/FDC
  3512. Adaptec 2940        aha274x        PCI        
  3513. Allways IN2000        in2000        ISA
  3514. BusLogic BT-948        BusLogic    PCI    $180    Ultra SCSI
  3515. BusLogic BT-958        BusLogic    PCI    $230    Wide Ultra SCSI
  3516. (see section 4.8 for additional BusLogic board descriptions)
  3517. DPT     PM2011        eata_dma    ISA        FAST SCSI-II
  3518.     PM2012A        eata_dma    EISA        FAST SCSI-II
  3519.     PM2012B        eata_dma    EISA        FAST SCSI-II
  3520.     PM2021        eata_dma    ISA        FAST SCSI-II
  3521.      PM2022        eata_dma    EISA        FAST SCSI-II
  3522.     PM2024        eata_dma    PCI        FAST SCSI-II  
  3523.     PM2122        eata_dma    EISA        FAST SCSI-II
  3524.     PM2322        eata_dma    EISA        FAST SCSI-II
  3525.     PM2124        eata_dma    PCI        FAST SCSI-II
  3526.     PM2124        eata_dma    PCI        FAST SCSI-II
  3527.     PM2124        eata_dma    PCI        FAST SCSI-II
  3528.     PM2124        eata_dma    PCI        FAST SCSI-II
  3529.     PM2124        eata_dma    PCI        FAST SCSI-II
  3530.     PM2124        eata_dma    PCI        FAST SCSI-II
  3531.         PM2041W         eata_dma    ISA         Wide Single-ended 
  3532.                             SCSI-II
  3533.         PM2041UW        eata_dma    ISA         Ultra Wide Single-ended
  3534.     PM2042W         eata_dma    EISA        Wide Single-ended 
  3535.     PM2042UW        eata_dma    EISA        Ultra Wide Single-ended
  3536.     PM2044W         eata_dma    PCI         Wide Single-ended 
  3537.     PM2044UW        eata_dma    PCI         Ultra Wide Single-ended
  3538.     PM2142W         eata_dma    EISA        Wide Single-ended
  3539.     PM2142UW        eata_dma    EISA        Ultra Wide Single-ended
  3540.     PM2144W         eata_dma    PCI         Wide Single-ended 
  3541.     PM2144UW        eata_dma    PCI         Ultra Wide Single-ended
  3542.     PM3021        eata_dma    ISA        multichannel
  3543.                             raid/simm sockets 
  3544.     PM3122        eata_dma    EISA        multichannel/raid
  3545.     PM3222        eata_dma    EISA        multichannel
  3546.                             raid/simm sockets 
  3547.     PM3224        eata_dma    PCI        multichannel
  3548.                             raid/simm sockets 
  3549.     PM3334        eata_dma    PCI        Wide Ultra SCSI
  3550.                             multichannel
  3551.                             raid/simm sockets 
  3552.  
  3553. DTC 3290        aha1542        EISA        Although it should work,
  3554.                             due to documentation
  3555.                             release polcies, DTC
  3556.                             hardware is unsupported
  3557. DTC 3130        53c7,8xx    PCI        '810
  3558. DTC 3130B        53c7,8xx    PCI        '815
  3559. DTC 3292        aha1542        EISA        3290 w/FDC
  3560. DTC 3292        aha1542        EISA        3290 w/FDC
  3561. Future Domain 1680    fdomain        ISA        FDC
  3562. Future Domain 3260    fdomain        PCI
  3563. NCR53c810 (boards sold 53c7,8xx        PCI     $60    chip, not board. Boards
  3564.     by FIC, Chaintech,                (board)    don't include
  3565.     Nextor, Gigabyte, etc.                      BIOS, although most
  3566.     Mainboards with chip by                non-NCR equipped main
  3567.     AMI, ASUS, J-Bond,                    boards have the SDMS
  3568.     etc. Common in DEC                    BIOS
  3569.     PCI systems)
  3570. NCR53c815 (           53c7,8xx        PCI    $100    NCR53c810 plus 
  3571.     Intel PCISCSIKIT,                    bios
  3572.     NCR8150S, etc)
  3573. NCR53c825           53c7,8xx        PCI     $120    Wide variant of 
  3574.                             NCR53c815.  Note that
  3575.                             the current Linux 
  3576.                             driver does not 
  3577.                             negotiate for wide
  3578.                             transfers.
  3579. Pro Audio Spectrum 16    pas16        ISA        Sound board w/SCSI
  3580. Seagate ST01        seagate        ISA    $20    BIOS only works with
  3581.                             some drives
  3582. Seagate ST02        seagate        ISA    $40    ST01 w/FDC
  3583. Sound Blaster 16 SCSI     aha152x        ISA        Sound board w/SCSI
  3584. Western Digital 7000    wd7000        ISA        w/FDC
  3585. Trantor T128        t128        ISA        
  3586. Trantor T128F        t128        ISA        T128 w/FDC and 
  3587.                             support for high IRQs
  3588. Trantor T130B        g_NCR5380    ISA        
  3589. Ultrastor 14F        ultrastor    ISA        w/FDC
  3590. Ultrastor 24F        ultrastor    EISA        w/FDC
  3591. Ultrastor 34F        ultrastor    VLB 
  3592.  
  3593. Notes : 
  3594. 1.  Trantor was recently purchased by Adaptec, and some products are being    
  3595.     sold under the Adaptec name.
  3596.  
  3597. 2.  Ultrastor recently filed for Chapter 11 Bankruptcy, so technical
  3598.     support is non-existant at this time.
  3599.  
  3600. 3.  The price for the busmastering NCR53c810 boards is not
  3601.     a typo, includes the standard ASPI/CAM driver package for 
  3602.     DOS, OS/2 and Windows (32 bit access), and other drivers are 
  3603.     available for free download. 
  3604.  
  3605.     Some people have had luck with the following companies :
  3606.  
  3607.  
  3608.        SW (swt@netcom.com) (214) 907-0871 fax (214) 907-9339
  3609.  
  3610.     As of 23 Dec 1995, their price was $53 on '810 boards.
  3611.  
  3612. 4.  Adaptec's recent SCSI chips show an unusual sensitivity
  3613.     to cabling and termination problems. For this reason,
  3614.     I cannot recommend the Adaptec 154x C and CF revisions or the 
  3615.     2xxx series.
  3616.  
  3617.     Note that the reliability problems do not apply to the 
  3618.     older 154x B revision boards, 174x A revision boards,
  3619.     or to my knowledge AIC-6360/AIC-6260 based boards (1505, 1510,
  3620.     1520, etc).
  3621.  
  3622.     Also, the quality of their technical support has slipped markedly, with
  3623.     long delays becoming more common, and their employees being ignorant 
  3624.     (suggesting there were non-disclosure policies affecting certain
  3625.     literature when there were none), and hostile (ie, refusing to pass 
  3626.     questions on to some one else when they couldn't answer them).
  3627.  
  3628.     If users desire handholding, or wish to make a political statement,
  3629.     they should take this point into consideration.  Otherwise, the 
  3630.     Adaptec 152x/1510/1505 are nicer than the other ISA boards in the 
  3631.     same price range, and there are some excellent deals on used and
  3632.     surplus 154x B revision boards and 1742 boards which IMHO outweigh
  3633.     the support problems.
  3634.  
  3635. 5.  All DPT boards can be upgraded with cache and raid modules, most of the 
  3636.     boards are also available in Wide and/or Differential versions.
  3637.  
  3638. 6.  The various NCR boards are not entirely equivallent.  Ie, while
  3639.     the ASUS SC200 uses active termination, many other NCR53c810 
  3640.     boards use passive termination.  Most '825 boards use active
  3641.     termination, but some use a ROM for BIOS and others have a
  3642.     FLASH ROM.  Most '825 boards have a WIDE external connector,
  3643.     WIDE internal connector, and narrow internal connector, although
  3644.     a few (ie, CSC's less expensive model) lack the narrow internal 
  3645.     connector.
  3646.  
  3647. Section 9.9 : Summary
  3648.  
  3649.     Most ISA, EISA, VESA, and PCI users will probably be served best by a
  3650. BusLogic MultiMaster board, due to its performance, features such as active
  3651. termination, and Adaptec 1540 compatability.  There are a number of models
  3652. available with EISA, ISA, PCI, and VESA local bus interfaces, in single ended
  3653. and differential, and 8/16 bit SCSI bus widths.  The most recent Ultra SCSI PCI
  3654. models, the BT-948/958/958D, also include Flash ROM for easy firmware updates,
  3655. as well as automatic "smart" termination.
  3656.  
  3657. People with the need for the highest possible IO performance at their 
  3658. fingertips should consider the boards from DPT, which are the only ones 
  3659. that support RAID, caching and more than one SCSI channel. 
  3660.  
  3661.     People with PCI systems should consider NCR53c8xx based boards.  These 
  3662. are bus mastering SCSI controllers, '810s are available quantity one for $53
  3663. (ie, cheaper than the Adaptec 1520).  C't magazine benchmarked the boards
  3664. as faster than both the Adaptec 2940 and BusLogic BT-946C (under DOS),
  3665. and they get reasonable performance under Linux (up to 6M/sec through the 
  3666. file system ). The disadvantages of these boards versus the BusLogics 
  3667. are that they aren't Adaptec 1540 compatable, may or may not come with 
  3668. active termination, you'll need the latest driver revision (standard 
  3669. in 1.3.5x, also available via anonymous FTP for 1.2.x) to make full use 
  3670. of the hardware, and are more likely to have problems than with a mailbox 
  3671. interface board like a BusLogic or DPT.  
  3672.  
  3673.     Where everything working right on the first try is imperative, a
  3674. BusLogic MultiMaster or DPT board is probably optimal due to the 
  3675. complexity and potential for problems in non-mailbox interface boards like 
  3676. the NCR53c8xx and Adaptec AIC7xxx .
  3677.  
  3678.     People wanting non-PCI SCSI on a limited budget will probably be 
  3679. happiest finding a surplus or used Adaptec 154x B revision or 174x A 
  3680. revision, or an Adaptec 1520 clone of some sort (about $80) if they want
  3681. new hardware.  These boards offer reasonable throughput and interactive 
  3682. performance at a modest price.
  3683.  
  3684. Section 10 : Assignment of minor numbers
  3685.  
  3686. Due to constraints imposed by Linux's use of a sixteen bit dev_t with
  3687. only eight bits allocated to the minor number, SCSI disk, tape,
  3688. CDROM, and generic minor numbers are assigned dynamically.  
  3689. iaccording to the following procedure :
  3690.  
  3691.     For all SCSI host adapters, from scsi0 through scsiN
  3692.             For all SCSI IDs on this bus, from 0 through 7, except for 
  3693.           this host adapter's ID
  3694.                 For all logical units, from 0 through max_scsi_luns
  3695.           - Probe the bus, target, and LUN combination by 
  3696.             issuing a TEST UNIT READY command.  If we don't
  3697.             think a unit was here, don't probe any more LUNs
  3698.             on this bus + SCSI ID.
  3699.           - Send an INQUIRY command to determine what we've
  3700.             found; including the device type, vendor, model,
  3701.             firmware revision, etc.
  3702.           - Pass the results of this to a special recognition
  3703.             function for each high level driver present (i.e. disk,
  3704.             tape, etc).  Attach this device to the next available
  3705.             unit for any drivers that are willing to drive this.
  3706.             The generic device will attach to all devices.
  3707.           - If it was SCSI-I, or in a list of devices known 
  3708.             not to handle multiple LUNs, don't probe any more 
  3709.             LUNs on this bus + SCSI ID.
  3710.           - If it is a device known to have multiple LUNs, then
  3711.             a scan of the full LUN spectrum is forced, overriding
  3712.             max_scsi_luns.
  3713.           
  3714. There are frequently problems with this approach because if you have a
  3715. system where some devices are only present some of the time, then the
  3716. minor numbers for a given device will depend upon which devices were
  3717. present at boot time.  This can present problem, because rc scripts or
  3718. the file /etc/fstab might contain instructions for mounting specific
  3719. partitions which fails when the disk appears with a different minor
  3720. number.
  3721.  
  3722.     This problem has not yet been fully solved.  There is a
  3723. program which can be found on tsx-11 that creates a /dev/scsi heirarchy
  3724. based upon host number, id and lun.  This is a bit clumsy, but it would
  3725. help to alleviate some of the problems.
  3726.  
  3727.     A better solution will probably come out of the /proc/scsi pseudo
  3728. directory.  This is currently a work in progress, so at present we cannot
  3729. say exactly the form of the solution, but at the time of this writing
  3730. this appears to be a promising approach for resolving some of these
  3731. issues.
  3732. EOF
  3733.